OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 : public ServiceWorkerRequestHandler, | 43 : public ServiceWorkerRequestHandler, |
44 public ServiceWorkerURLJobWrapper::Delegate { | 44 public ServiceWorkerURLJobWrapper::Delegate { |
45 public: | 45 public: |
46 ServiceWorkerControlleeRequestHandler( | 46 ServiceWorkerControlleeRequestHandler( |
47 base::WeakPtr<ServiceWorkerContextCore> context, | 47 base::WeakPtr<ServiceWorkerContextCore> context, |
48 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 48 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
49 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 49 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
50 FetchRequestMode request_mode, | 50 FetchRequestMode request_mode, |
51 FetchCredentialsMode credentials_mode, | 51 FetchCredentialsMode credentials_mode, |
52 FetchRedirectMode redirect_mode, | 52 FetchRedirectMode redirect_mode, |
| 53 const std::string& integrity, |
53 ResourceType resource_type, | 54 ResourceType resource_type, |
54 RequestContextType request_context_type, | 55 RequestContextType request_context_type, |
55 RequestContextFrameType frame_type, | 56 RequestContextFrameType frame_type, |
56 scoped_refptr<ResourceRequestBody> body); | 57 scoped_refptr<ResourceRequestBody> body); |
57 ~ServiceWorkerControlleeRequestHandler() override; | 58 ~ServiceWorkerControlleeRequestHandler() override; |
58 | 59 |
59 // Called via custom URLRequestJobFactory. | 60 // Called via custom URLRequestJobFactory. |
60 // Returning a nullptr indicates that the request is not handled by | 61 // Returning a nullptr indicates that the request is not handled by |
61 // this handler. | 62 // this handler. |
62 // This could get called multiple times during the lifetime. | 63 // This could get called multiple times during the lifetime. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 void ClearJob(); | 121 void ClearJob(); |
121 | 122 |
122 bool JobWasCanceled() const; | 123 bool JobWasCanceled() const; |
123 | 124 |
124 const bool is_main_resource_load_; | 125 const bool is_main_resource_load_; |
125 const bool is_main_frame_load_; | 126 const bool is_main_frame_load_; |
126 std::unique_ptr<ServiceWorkerURLJobWrapper> url_job_; | 127 std::unique_ptr<ServiceWorkerURLJobWrapper> url_job_; |
127 FetchRequestMode request_mode_; | 128 FetchRequestMode request_mode_; |
128 FetchCredentialsMode credentials_mode_; | 129 FetchCredentialsMode credentials_mode_; |
129 FetchRedirectMode redirect_mode_; | 130 FetchRedirectMode redirect_mode_; |
| 131 std::string integrity_; |
130 RequestContextType request_context_type_; | 132 RequestContextType request_context_type_; |
131 RequestContextFrameType frame_type_; | 133 RequestContextFrameType frame_type_; |
132 scoped_refptr<ResourceRequestBody> body_; | 134 scoped_refptr<ResourceRequestBody> body_; |
133 ResourceContext* resource_context_; | 135 ResourceContext* resource_context_; |
134 GURL stripped_url_; | 136 GURL stripped_url_; |
135 bool force_update_started_; | 137 bool force_update_started_; |
136 | 138 |
137 // True if the next time this request is started, the response should be | 139 // True if the next time this request is started, the response should be |
138 // delivered from the network, bypassing the ServiceWorker. Cleared after the | 140 // delivered from the network, bypassing the ServiceWorker. Cleared after the |
139 // next intercept opportunity, for main frame requests. | 141 // next intercept opportunity, for main frame requests. |
140 bool use_network_; | 142 bool use_network_; |
141 | 143 |
142 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 144 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
143 | 145 |
144 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 146 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
145 }; | 147 }; |
146 | 148 |
147 } // namespace content | 149 } // namespace content |
148 | 150 |
149 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 151 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
OLD | NEW |