| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 net::URLRequest* request, | 61 net::URLRequest* request, |
| 62 net::NetworkDelegate* network_delegate, | 62 net::NetworkDelegate* network_delegate, |
| 63 ResourceContext* resource_context) override; | 63 ResourceContext* resource_context) override; |
| 64 | 64 |
| 65 // Used only for PlzNavigate and --enable-network-service cases. | 65 // Used only for PlzNavigate and --enable-network-service cases. |
| 66 // This will replace MaybeCreateJob() once NetworkService is enabled. | 66 // This will replace MaybeCreateJob() once NetworkService is enabled. |
| 67 // This could get called multiple times during the lifetime in redirect | 67 // This could get called multiple times during the lifetime in redirect |
| 68 // cases. (In fallback-to-network cases we basically forward the request | 68 // cases. (In fallback-to-network cases we basically forward the request |
| 69 // to the request to the next request handler) | 69 // to the request to the next request handler) |
| 70 // URLLoaderRequestHandler overrides: | 70 // URLLoaderRequestHandler overrides: |
| 71 void MaybeCreateLoaderFactory( | 71 void MaybeCreateLoader(const ResourceRequest& request, |
| 72 const ResourceRequest& request, | 72 ResourceContext* resource_context, |
| 73 ResourceContext* resource_context, | 73 LoaderCallback callback) override; |
| 74 base::OnceCallback<void(mojom::URLLoaderFactory*)> callback) override; | |
| 75 | 74 |
| 76 private: | 75 private: |
| 77 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, | 76 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, |
| 78 ActivateWaitingVersion); | 77 ActivateWaitingVersion); |
| 79 typedef ServiceWorkerControlleeRequestHandler self; | 78 typedef ServiceWorkerControlleeRequestHandler self; |
| 80 | 79 |
| 81 // For main resource case. | 80 // For main resource case. |
| 82 void PrepareForMainResource(const GURL& url, | 81 void PrepareForMainResource(const GURL& url, |
| 83 const GURL& first_party_for_cookies); | 82 const GURL& first_party_for_cookies); |
| 84 void DidLookupRegistrationForMainResource( | 83 void DidLookupRegistrationForMainResource( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 bool use_network_; | 136 bool use_network_; |
| 138 | 137 |
| 139 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 138 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
| 140 | 139 |
| 141 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 140 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
| 142 }; | 141 }; |
| 143 | 142 |
| 144 } // namespace content | 143 } // namespace content |
| 145 | 144 |
| 146 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 145 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
| OLD | NEW |