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/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 storage::BlobStorageContext* blob_storage_context, | 54 storage::BlobStorageContext* blob_storage_context, |
55 int process_id, | 55 int process_id, |
56 int provider_id, | 56 int provider_id, |
57 bool skip_service_worker, | 57 bool skip_service_worker, |
58 FetchRequestMode request_mode, | 58 FetchRequestMode request_mode, |
59 FetchCredentialsMode credentials_mode, | 59 FetchCredentialsMode credentials_mode, |
60 FetchRedirectMode redirect_mode, | 60 FetchRedirectMode redirect_mode, |
61 ResourceType resource_type, | 61 ResourceType resource_type, |
62 RequestContextType request_context_type, | 62 RequestContextType request_context_type, |
63 RequestContextFrameType frame_type, | 63 RequestContextFrameType frame_type, |
64 scoped_refptr<ResourceRequestBody> body, | 64 scoped_refptr<ResourceRequestBody> body); |
65 bool initiated_in_secure_context); | |
66 | 65 |
67 // Returns the handler attached to |request|. This may return null | 66 // Returns the handler attached to |request|. This may return null |
68 // if no handler is attached. | 67 // if no handler is attached. |
69 static ForeignFetchRequestHandler* GetHandler(net::URLRequest* request); | 68 static ForeignFetchRequestHandler* GetHandler(net::URLRequest* request); |
70 | 69 |
71 // Creates a protocol interceptor for foreign fetch. | 70 // Creates a protocol interceptor for foreign fetch. |
72 static std::unique_ptr<net::URLRequestInterceptor> CreateInterceptor( | 71 static std::unique_ptr<net::URLRequestInterceptor> CreateInterceptor( |
73 ResourceContext* resource_context); | 72 ResourceContext* resource_context); |
74 | 73 |
75 ~ForeignFetchRequestHandler() override; | 74 ~ForeignFetchRequestHandler() override; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 bool use_network_ = false; | 124 bool use_network_ = false; |
126 | 125 |
127 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; | 126 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; |
128 | 127 |
129 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); | 128 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); |
130 }; | 129 }; |
131 | 130 |
132 } // namespace content | 131 } // namespace content |
133 | 132 |
134 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ | 133 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ |
OLD | NEW |