| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FOREIGN_FETCH_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 static bool IsForeignFetchEnabled(); | 51 static bool IsForeignFetchEnabled(); |
| 52 | 52 |
| 53 // Attaches a newly created handler if the given |request| needs to | 53 // Attaches a newly created handler if the given |request| needs to |
| 54 // be handled by a foreign fetch handling ServiceWorker. | 54 // be handled by a foreign fetch handling ServiceWorker. |
| 55 static void InitializeHandler( | 55 static void InitializeHandler( |
| 56 net::URLRequest* request, | 56 net::URLRequest* request, |
| 57 ServiceWorkerContextWrapper* context_wrapper, | 57 ServiceWorkerContextWrapper* context_wrapper, |
| 58 storage::BlobStorageContext* blob_storage_context, | 58 storage::BlobStorageContext* blob_storage_context, |
| 59 int process_id, | 59 int process_id, |
| 60 int provider_id, | 60 int provider_id, |
| 61 SkipServiceWorker skip_service_worker, | 61 ServiceWorkerMode service_worker_mode, |
| 62 FetchRequestMode request_mode, | 62 FetchRequestMode request_mode, |
| 63 FetchCredentialsMode credentials_mode, | 63 FetchCredentialsMode credentials_mode, |
| 64 FetchRedirectMode redirect_mode, | 64 FetchRedirectMode redirect_mode, |
| 65 ResourceType resource_type, | 65 ResourceType resource_type, |
| 66 RequestContextType request_context_type, | 66 RequestContextType request_context_type, |
| 67 RequestContextFrameType frame_type, | 67 RequestContextFrameType frame_type, |
| 68 scoped_refptr<ResourceRequestBodyImpl> body, | 68 scoped_refptr<ResourceRequestBodyImpl> body, |
| 69 bool initiated_in_secure_context); | 69 bool initiated_in_secure_context); |
| 70 | 70 |
| 71 // Returns the handler attached to |request|. This may return null | 71 // Returns the handler attached to |request|. This may return null |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 bool use_network_ = false; | 140 bool use_network_ = false; |
| 141 | 141 |
| 142 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; | 142 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; |
| 143 | 143 |
| 144 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); | 144 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace content | 147 } // namespace content |
| 148 | 148 |
| 149 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ | 149 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ |
| OLD | NEW |