From 1228c324bca3e264d8118e8057ddb0f4a04b3d9d Mon Sep 17 00:00:00 2001 From: "horo@chromium.org" Date: Mon, 18 Aug 2014 13:17:53 +0000 Subject: [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 --- .../browser/service_worker/service_worker_request_handler.cc | 12 +----------- 1 file changed, 1 insertion(+), 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) { -- cgit v1.1