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

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
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..e9e433fedf3983c257dca655959bb7db62b32ebe
--- /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);
kinuko 2014/04/24 05:15:00 OVERRIDE
michaeln 2014/04/24 19:01:19 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698