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

Side by Side Diff: content/browser/service_worker/service_worker_controllee_request_handler.h

Issue 2008613002: ABANDONED CL: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@post-data-my-stuff
Patch Set: Rebasing... Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 10 matching lines...) Expand all
21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerResponseType.h" 21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerResponseType.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 namespace net { 24 namespace net {
25 class NetworkDelegate; 25 class NetworkDelegate;
26 class URLRequest; 26 class URLRequest;
27 } 27 }
28 28
29 namespace content { 29 namespace content {
30 30
31 class ResourceRequestBody; 31 class ResourceRequestBodyImpl;
32 class ServiceWorkerRegistration; 32 class ServiceWorkerRegistration;
33 class ServiceWorkerVersion; 33 class ServiceWorkerVersion;
34 34
35 // A request handler derivative used to handle requests from 35 // A request handler derivative used to handle requests from
36 // controlled documents. 36 // controlled documents.
37 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler 37 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler
38 : public ServiceWorkerRequestHandler, 38 : public ServiceWorkerRequestHandler,
39 public ServiceWorkerURLRequestJob::Delegate { 39 public ServiceWorkerURLRequestJob::Delegate {
40 public: 40 public:
41 ServiceWorkerControlleeRequestHandler( 41 ServiceWorkerControlleeRequestHandler(
42 base::WeakPtr<ServiceWorkerContextCore> context, 42 base::WeakPtr<ServiceWorkerContextCore> context,
43 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 43 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
44 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 44 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
45 FetchRequestMode request_mode, 45 FetchRequestMode request_mode,
46 FetchCredentialsMode credentials_mode, 46 FetchCredentialsMode credentials_mode,
47 FetchRedirectMode redirect_mode, 47 FetchRedirectMode redirect_mode,
48 ResourceType resource_type, 48 ResourceType resource_type,
49 RequestContextType request_context_type, 49 RequestContextType request_context_type,
50 RequestContextFrameType frame_type, 50 RequestContextFrameType frame_type,
51 scoped_refptr<ResourceRequestBody> body); 51 scoped_refptr<ResourceRequestBodyImpl> body);
52 ~ServiceWorkerControlleeRequestHandler() override; 52 ~ServiceWorkerControlleeRequestHandler() override;
53 53
54 // Called via custom URLRequestJobFactory. 54 // Called via custom URLRequestJobFactory.
55 net::URLRequestJob* MaybeCreateJob( 55 net::URLRequestJob* MaybeCreateJob(
56 net::URLRequest* request, 56 net::URLRequest* request,
57 net::NetworkDelegate* network_delegate, 57 net::NetworkDelegate* network_delegate,
58 ResourceContext* resource_context) override; 58 ResourceContext* resource_context) override;
59 59
60 private: 60 private:
61 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, 61 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // that job, except for timing information. 99 // that job, except for timing information.
100 void ClearJob(); 100 void ClearJob();
101 101
102 bool is_main_resource_load_; 102 bool is_main_resource_load_;
103 base::WeakPtr<ServiceWorkerURLRequestJob> job_; 103 base::WeakPtr<ServiceWorkerURLRequestJob> job_;
104 FetchRequestMode request_mode_; 104 FetchRequestMode request_mode_;
105 FetchCredentialsMode credentials_mode_; 105 FetchCredentialsMode credentials_mode_;
106 FetchRedirectMode redirect_mode_; 106 FetchRedirectMode redirect_mode_;
107 RequestContextType request_context_type_; 107 RequestContextType request_context_type_;
108 RequestContextFrameType frame_type_; 108 RequestContextFrameType frame_type_;
109 scoped_refptr<ResourceRequestBody> body_; 109 scoped_refptr<ResourceRequestBodyImpl> body_;
110 ResourceContext* resource_context_; 110 ResourceContext* resource_context_;
111 GURL stripped_url_; 111 GURL stripped_url_;
112 bool force_update_started_; 112 bool force_update_started_;
113 113
114 // True if the next time this request is started, the response should be 114 // True if the next time this request is started, the response should be
115 // delivered from the network, bypassing the ServiceWorker. Cleared after the 115 // delivered from the network, bypassing the ServiceWorker. Cleared after the
116 // next intercept opportunity, for main frame requests. 116 // next intercept opportunity, for main frame requests.
117 bool use_network_; 117 bool use_network_;
118 118
119 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 119 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 121 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
122 }; 122 };
123 123
124 } // namespace content 124 } // namespace content
125 125
126 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 126 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698