| 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 30 matching lines...) Expand all Loading... |
| 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<ResourceRequestBodyImpl> body, | 51 scoped_refptr<ResourceRequestBodyImpl> body); |
| 52 const MojoURLLoaderFactoryGetter& url_loader_factory_getter); | |
| 53 ~ServiceWorkerControlleeRequestHandler() override; | 52 ~ServiceWorkerControlleeRequestHandler() override; |
| 54 | 53 |
| 55 // Called via custom URLRequestJobFactory. | 54 // Called via custom URLRequestJobFactory. |
| 56 net::URLRequestJob* MaybeCreateJob( | 55 net::URLRequestJob* MaybeCreateJob( |
| 57 net::URLRequest* request, | 56 net::URLRequest* request, |
| 58 net::NetworkDelegate* network_delegate, | 57 net::NetworkDelegate* network_delegate, |
| 59 ResourceContext* resource_context) override; | 58 ResourceContext* resource_context) override; |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, | 61 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 scoped_refptr<ResourceRequestBodyImpl> body_; | 110 scoped_refptr<ResourceRequestBodyImpl> body_; |
| 112 ResourceContext* resource_context_; | 111 ResourceContext* resource_context_; |
| 113 GURL stripped_url_; | 112 GURL stripped_url_; |
| 114 bool force_update_started_; | 113 bool force_update_started_; |
| 115 | 114 |
| 116 // True if the next time this request is started, the response should be | 115 // True if the next time this request is started, the response should be |
| 117 // delivered from the network, bypassing the ServiceWorker. Cleared after the | 116 // delivered from the network, bypassing the ServiceWorker. Cleared after the |
| 118 // next intercept opportunity, for main frame requests. | 117 // next intercept opportunity, for main frame requests. |
| 119 bool use_network_; | 118 bool use_network_; |
| 120 | 119 |
| 121 const MojoURLLoaderFactoryGetter url_loader_factory_getter_; | |
| 122 | |
| 123 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 120 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
| 124 | 121 |
| 125 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 122 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
| 126 }; | 123 }; |
| 127 | 124 |
| 128 } // namespace content | 125 } // namespace content |
| 129 | 126 |
| 130 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 127 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
| OLD | NEW |