OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
13 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 13 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
14 #include "chrome/browser/profiles/profile_io_data.h" | 14 #include "chrome/browser/profiles/profile_io_data.h" |
15 #include "components/prefs/pref_store.h" | 15 #include "components/prefs/pref_store.h" |
16 #include "content/public/browser/cookie_store_factory.h" | 16 #include "content/public/browser/cookie_store_factory.h" |
17 | 17 |
18 namespace chrome_browser_net { | 18 namespace chrome_browser_net { |
19 class Predictor; | 19 class Predictor; |
20 } // namespace chrome_browser_net | 20 } // namespace chrome_browser_net |
21 | 21 |
22 namespace domain_reliability { | 22 namespace domain_reliability { |
23 class DomainReliabilityMonitor; | 23 class DomainReliabilityMonitor; |
24 } // namespace domain_reliability | 24 } // namespace domain_reliability |
25 | 25 |
26 namespace net { | 26 namespace net { |
27 class CookieStore; | 27 class CookieStore; |
28 class HttpServerPropertiesManager; | 28 class HttpServerPropertiesManager; |
29 struct ReportingPolicy; | |
30 class ReportingService; | |
31 class URLRequestContextBuilder; | |
32 } // namespace net | 29 } // namespace net |
33 | 30 |
34 namespace storage { | 31 namespace storage { |
35 class SpecialStoragePolicy; | 32 class SpecialStoragePolicy; |
36 } // namespace storage | 33 } // namespace storage |
37 | 34 |
38 class ProfileImplIOData : public ProfileIOData { | 35 class ProfileImplIOData : public ProfileIOData { |
39 public: | 36 public: |
40 class Handle { | 37 class Handle { |
41 public: | 38 public: |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 }; | 154 }; |
158 | 155 |
159 ProfileImplIOData(); | 156 ProfileImplIOData(); |
160 ~ProfileImplIOData() override; | 157 ~ProfileImplIOData() override; |
161 | 158 |
162 std::unique_ptr<net::NetworkDelegate> ConfigureNetworkDelegate( | 159 std::unique_ptr<net::NetworkDelegate> ConfigureNetworkDelegate( |
163 IOThread* io_thread, | 160 IOThread* io_thread, |
164 std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate) | 161 std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate) |
165 const override; | 162 const override; |
166 | 163 |
167 void InitializeInternal(net::URLRequestContextBuilder* builder, | 164 void InitializeInternal( |
168 ProfileParams* profile_params, | 165 ProfileParams* profile_params, |
169 content::ProtocolHandlerMap* protocol_handlers, | 166 content::ProtocolHandlerMap* protocol_handlers, |
170 content::URLRequestInterceptorScopedVector | 167 content::URLRequestInterceptorScopedVector request_interceptors) |
171 request_interceptors) const override; | 168 const override; |
172 void OnMainRequestContextCreated( | |
173 ProfileParams* profile_params) const override; | |
174 void InitializeExtensionsRequestContext( | 169 void InitializeExtensionsRequestContext( |
175 ProfileParams* profile_params) const override; | 170 ProfileParams* profile_params) const override; |
176 net::URLRequestContext* InitializeAppRequestContext( | 171 net::URLRequestContext* InitializeAppRequestContext( |
177 net::URLRequestContext* main_context, | 172 net::URLRequestContext* main_context, |
178 const StoragePartitionDescriptor& partition_descriptor, | 173 const StoragePartitionDescriptor& partition_descriptor, |
179 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 174 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
180 protocol_handler_interceptor, | 175 protocol_handler_interceptor, |
181 content::ProtocolHandlerMap* protocol_handlers, | 176 content::ProtocolHandlerMap* protocol_handlers, |
182 content::URLRequestInterceptorScopedVector request_interceptors) | 177 content::URLRequestInterceptorScopedVector request_interceptors) |
183 const override; | 178 const override; |
184 net::URLRequestContext* InitializeMediaRequestContext( | 179 net::URLRequestContext* InitializeMediaRequestContext( |
185 net::URLRequestContext* original_context, | 180 net::URLRequestContext* original_context, |
186 const StoragePartitionDescriptor& partition_descriptor, | 181 const StoragePartitionDescriptor& partition_descriptor, |
187 const char* name) const override; | 182 const char* name) const override; |
188 net::URLRequestContext* AcquireMediaRequestContext() const override; | 183 net::URLRequestContext* AcquireMediaRequestContext() const override; |
189 net::URLRequestContext* AcquireIsolatedAppRequestContext( | 184 net::URLRequestContext* AcquireIsolatedAppRequestContext( |
190 net::URLRequestContext* main_context, | 185 net::URLRequestContext* main_context, |
191 const StoragePartitionDescriptor& partition_descriptor, | 186 const StoragePartitionDescriptor& partition_descriptor, |
192 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 187 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
193 protocol_handler_interceptor, | 188 protocol_handler_interceptor, |
194 content::ProtocolHandlerMap* protocol_handlers, | 189 content::ProtocolHandlerMap* protocol_handlers, |
195 content::URLRequestInterceptorScopedVector request_interceptors) | 190 content::URLRequestInterceptorScopedVector request_interceptors) |
196 const override; | 191 const override; |
197 net::URLRequestContext* AcquireIsolatedMediaRequestContext( | 192 net::URLRequestContext* AcquireIsolatedMediaRequestContext( |
198 net::URLRequestContext* app_context, | 193 net::URLRequestContext* app_context, |
199 const StoragePartitionDescriptor& partition_descriptor) const override; | 194 const StoragePartitionDescriptor& partition_descriptor) const override; |
200 chrome_browser_net::Predictor* GetPredictor() override; | 195 chrome_browser_net::Predictor* GetPredictor() override; |
201 | 196 |
202 // Returns a net::ReportingService, if reporting should be enabled. Otherwise, | |
203 // returns nullptr. | |
204 // TODO(mmenke): Remove once URLRequestContextBuilders are always used to | |
205 // create URLRequestContexts. | |
206 std::unique_ptr<net::ReportingService> MaybeCreateReportingService( | 197 std::unique_ptr<net::ReportingService> MaybeCreateReportingService( |
207 net::URLRequestContext* url_request_context) const; | 198 net::URLRequestContext* url_request_context) const; |
208 | 199 |
209 // Returns a net::ReportingPolicy, if reporting should be enabled. Otherwise, | |
210 // returns nullptr. | |
211 static std::unique_ptr<net::ReportingPolicy> MaybeCreateReportingPolicy(); | |
212 | |
213 // Deletes all network related data since |time|. It deletes transport | 200 // Deletes all network related data since |time|. It deletes transport |
214 // security state since |time| and also deletes HttpServerProperties data. | 201 // security state since |time| and also deletes HttpServerProperties data. |
215 // Works asynchronously, however if the |completion| callback is non-null, | 202 // Works asynchronously, however if the |completion| callback is non-null, |
216 // it will be posted on the UI thread once the removal process completes. | 203 // it will be posted on the UI thread once the removal process completes. |
217 void ClearNetworkingHistorySinceOnIOThread(base::Time time, | 204 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
218 const base::Closure& completion); | 205 const base::Closure& completion); |
219 | 206 |
220 // Lazy initialization params. | 207 // Lazy initialization params. |
221 mutable std::unique_ptr<LazyParams> lazy_params_; | 208 mutable std::unique_ptr<LazyParams> lazy_params_; |
222 | 209 |
(...skipping 13 matching lines...) Expand all Loading... |
236 | 223 |
237 // Parameters needed for isolated apps. | 224 // Parameters needed for isolated apps. |
238 base::FilePath profile_path_; | 225 base::FilePath profile_path_; |
239 int app_cache_max_size_; | 226 int app_cache_max_size_; |
240 int app_media_cache_max_size_; | 227 int app_media_cache_max_size_; |
241 | 228 |
242 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 229 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
243 }; | 230 }; |
244 | 231 |
245 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 232 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |