| 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; |
| 29 } // namespace net | 32 } // namespace net |
| 30 | 33 |
| 31 namespace storage { | 34 namespace storage { |
| 32 class SpecialStoragePolicy; | 35 class SpecialStoragePolicy; |
| 33 } // namespace storage | 36 } // namespace storage |
| 34 | 37 |
| 35 class ProfileImplIOData : public ProfileIOData { | 38 class ProfileImplIOData : public ProfileIOData { |
| 36 public: | 39 public: |
| 37 class Handle { | 40 class Handle { |
| 38 public: | 41 public: |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 ProfileImplIOData(); | 159 ProfileImplIOData(); |
| 157 ~ProfileImplIOData() override; | 160 ~ProfileImplIOData() override; |
| 158 | 161 |
| 159 std::unique_ptr<net::NetworkDelegate> ConfigureNetworkDelegate( | 162 std::unique_ptr<net::NetworkDelegate> ConfigureNetworkDelegate( |
| 160 IOThread* io_thread, | 163 IOThread* io_thread, |
| 161 std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate) | 164 std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate) |
| 162 const override; | 165 const override; |
| 163 | 166 |
| 164 void InitializeInternal( | 167 void InitializeInternal(net::URLRequestContextBuilder* builder, |
| 165 ProfileParams* profile_params, | 168 ProfileParams* profile_params, |
| 166 content::ProtocolHandlerMap* protocol_handlers, | 169 content::ProtocolHandlerMap* protocol_handlers, |
| 167 content::URLRequestInterceptorScopedVector request_interceptors) | 170 content::URLRequestInterceptorScopedVector |
| 168 const override; | 171 request_interceptors) const override; |
| 172 void OnMainRequestContextCreated( |
| 173 ProfileParams* profile_params) const override; |
| 169 void InitializeExtensionsRequestContext( | 174 void InitializeExtensionsRequestContext( |
| 170 ProfileParams* profile_params) const override; | 175 ProfileParams* profile_params) const override; |
| 171 net::URLRequestContext* InitializeAppRequestContext( | 176 net::URLRequestContext* InitializeAppRequestContext( |
| 172 net::URLRequestContext* main_context, | 177 net::URLRequestContext* main_context, |
| 173 const StoragePartitionDescriptor& partition_descriptor, | 178 const StoragePartitionDescriptor& partition_descriptor, |
| 174 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 179 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 175 protocol_handler_interceptor, | 180 protocol_handler_interceptor, |
| 176 content::ProtocolHandlerMap* protocol_handlers, | 181 content::ProtocolHandlerMap* protocol_handlers, |
| 177 content::URLRequestInterceptorScopedVector request_interceptors) | 182 content::URLRequestInterceptorScopedVector request_interceptors) |
| 178 const override; | 183 const override; |
| 179 net::URLRequestContext* InitializeMediaRequestContext( | 184 net::URLRequestContext* InitializeMediaRequestContext( |
| 180 net::URLRequestContext* original_context, | 185 net::URLRequestContext* original_context, |
| 181 const StoragePartitionDescriptor& partition_descriptor, | 186 const StoragePartitionDescriptor& partition_descriptor, |
| 182 const char* name) const override; | 187 const char* name) const override; |
| 183 net::URLRequestContext* AcquireMediaRequestContext() const override; | 188 net::URLRequestContext* AcquireMediaRequestContext() const override; |
| 184 net::URLRequestContext* AcquireIsolatedAppRequestContext( | 189 net::URLRequestContext* AcquireIsolatedAppRequestContext( |
| 185 net::URLRequestContext* main_context, | 190 net::URLRequestContext* main_context, |
| 186 const StoragePartitionDescriptor& partition_descriptor, | 191 const StoragePartitionDescriptor& partition_descriptor, |
| 187 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 192 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 188 protocol_handler_interceptor, | 193 protocol_handler_interceptor, |
| 189 content::ProtocolHandlerMap* protocol_handlers, | 194 content::ProtocolHandlerMap* protocol_handlers, |
| 190 content::URLRequestInterceptorScopedVector request_interceptors) | 195 content::URLRequestInterceptorScopedVector request_interceptors) |
| 191 const override; | 196 const override; |
| 192 net::URLRequestContext* AcquireIsolatedMediaRequestContext( | 197 net::URLRequestContext* AcquireIsolatedMediaRequestContext( |
| 193 net::URLRequestContext* app_context, | 198 net::URLRequestContext* app_context, |
| 194 const StoragePartitionDescriptor& partition_descriptor) const override; | 199 const StoragePartitionDescriptor& partition_descriptor) const override; |
| 195 chrome_browser_net::Predictor* GetPredictor() override; | 200 chrome_browser_net::Predictor* GetPredictor() override; |
| 196 | 201 |
| 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. |
| 197 std::unique_ptr<net::ReportingService> MaybeCreateReportingService( | 206 std::unique_ptr<net::ReportingService> MaybeCreateReportingService( |
| 198 net::URLRequestContext* url_request_context) const; | 207 net::URLRequestContext* url_request_context) const; |
| 199 | 208 |
| 209 // Returns a net::ReportingPolicy, if reporting should be enabled. Otherwise, |
| 210 // returns nullptr. |
| 211 static std::unique_ptr<net::ReportingPolicy> MaybeCreateReportingPolicy(); |
| 212 |
| 200 // Deletes all network related data since |time|. It deletes transport | 213 // Deletes all network related data since |time|. It deletes transport |
| 201 // security state since |time| and also deletes HttpServerProperties data. | 214 // security state since |time| and also deletes HttpServerProperties data. |
| 202 // Works asynchronously, however if the |completion| callback is non-null, | 215 // Works asynchronously, however if the |completion| callback is non-null, |
| 203 // it will be posted on the UI thread once the removal process completes. | 216 // it will be posted on the UI thread once the removal process completes. |
| 204 void ClearNetworkingHistorySinceOnIOThread(base::Time time, | 217 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
| 205 const base::Closure& completion); | 218 const base::Closure& completion); |
| 206 | 219 |
| 207 // Lazy initialization params. | 220 // Lazy initialization params. |
| 208 mutable std::unique_ptr<LazyParams> lazy_params_; | 221 mutable std::unique_ptr<LazyParams> lazy_params_; |
| 209 | 222 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 223 | 236 |
| 224 // Parameters needed for isolated apps. | 237 // Parameters needed for isolated apps. |
| 225 base::FilePath profile_path_; | 238 base::FilePath profile_path_; |
| 226 int app_cache_max_size_; | 239 int app_cache_max_size_; |
| 227 int app_media_cache_max_size_; | 240 int app_media_cache_max_size_; |
| 228 | 241 |
| 229 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 242 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
| 230 }; | 243 }; |
| 231 | 244 |
| 232 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 245 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
| OLD | NEW |