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

Unified Diff: content/browser/service_worker/service_worker_context_request_handler.h

Issue 255413005: Mostly manual refactoring of ServiceWorkerRequestHandler into a base class and two derived classes,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | content/browser/service_worker/service_worker_context_request_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_context_request_handler.h
diff --git a/content/browser/service_worker/service_worker_context_request_handler.h b/content/browser/service_worker/service_worker_context_request_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee24f4545e33f1e543ddde4d597210e1a41a29be
--- /dev/null
+++ b/content/browser/service_worker/service_worker_context_request_handler.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
+#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
+
+#include "content/browser/service_worker/service_worker_request_handler.h"
+
+namespace content {
+
+// A request handler derivative used to handle requests from
+// service workers.
+class CONTENT_EXPORT ServiceWorkerContextRequestHandler
+ : public ServiceWorkerRequestHandler {
+ public:
+ ServiceWorkerContextRequestHandler(
+ base::WeakPtr<ServiceWorkerContextCore> context,
+ base::WeakPtr<ServiceWorkerProviderHost> provider_host,
+ ResourceType::Type resource_type);
+ virtual ~ServiceWorkerContextRequestHandler();
+
+ // Called via custom URLRequestJobFactory.
+ virtual net::URLRequestJob* MaybeCreateJob(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698