Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Unified Diff: content/browser/service_worker/service_worker_request_handler.cc

Issue 483613004: [ServiceWorker] Support other methods than GET and HEAD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_request_handler.cc b/content/browser/service_worker/service_worker_request_handler.cc
index 7b615b372bc0de2fc9bc4740f798614df7fcb149..cb8abc85773091626bb91f089e62c7b644b193e9 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)) {
falken 2014/08/18 06:31:46 I was confused by this AppCache name. It was proba
horo 2014/08/18 06:49:44 I think ServiceWorkerRequestHandler was initially
+ if (!request->url().SchemeIsHTTPOrHTTPS())
return;
- }
if (!context_wrapper || !context_wrapper->context() ||
provider_id == kInvalidServiceWorkerProviderId) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698