diff options
author | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-18 13:17:53 +0000 |
---|---|---|
committer | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-18 13:19:19 +0000 |
commit | 1228c324bca3e264d8118e8057ddb0f4a04b3d9d (patch) | |
tree | a84c483d7eef9c3adb5b89e21a995691218c6e55 | |
parent | ae81b6d383e0770e0cce6facf314971eed09059b (diff) | |
download | chromium_src-1228c324bca3e264d8118e8057ddb0f4a04b3d9d.zip chromium_src-1228c324bca3e264d8118e8057ddb0f4a04b3d9d.tar.gz chromium_src-1228c324bca3e264d8118e8057ddb0f4a04b3d9d.tar.bz2 |
[ServiceWorker] Support other methods than GET and HEAD.
BUG=402387
Review URL: https://codereview.chromium.org/483613004
Cr-Commit-Position: refs/heads/master@{#290247}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290247 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/service_worker/service_worker_request_handler.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/content/browser/service_worker/service_worker_request_handler.cc b/content/browser/service_worker/service_worker_request_handler.cc index 7b615b3..cb8abc8 100644 --- a/content/browser/service_worker/service_worker_request_handler.cc +++ b/content/browser/service_worker/service_worker_request_handler.cc @@ -42,15 +42,6 @@ class ServiceWorkerRequestInterceptor DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestInterceptor); }; -bool IsMethodSupportedForAppCache(const std::string& method) { - return (method == "GET") || (method == "HEAD"); -} - -bool IsSchemeAndMethodSupportedForAppCache(const net::URLRequest* request) { - return request->url().SchemeIsHTTPOrHTTPS() && - IsMethodSupportedForAppCache(request->method()); -} - } // namespace void ServiceWorkerRequestHandler::InitializeHandler( @@ -60,9 +51,8 @@ void ServiceWorkerRequestHandler::InitializeHandler( int process_id, int provider_id, ResourceType resource_type) { - if (!IsSchemeAndMethodSupportedForAppCache(request)) { + if (!request->url().SchemeIsHTTPOrHTTPS()) return; - } if (!context_wrapper || !context_wrapper->context() || provider_id == kInvalidServiceWorkerProviderId) { |