| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ~Handle(); | 34 ~Handle(); |
| 35 | 35 |
| 36 // Init() must be called before ~Handle(). It records most of the | 36 // Init() must be called before ~Handle(). It records most of the |
| 37 // parameters needed to construct a ChromeURLRequestContextGetter. | 37 // parameters needed to construct a ChromeURLRequestContextGetter. |
| 38 void Init(const base::FilePath& cookie_path, | 38 void Init(const base::FilePath& cookie_path, |
| 39 const base::FilePath& server_bound_cert_path, | 39 const base::FilePath& server_bound_cert_path, |
| 40 const base::FilePath& cache_path, | 40 const base::FilePath& cache_path, |
| 41 int cache_max_size, | 41 int cache_max_size, |
| 42 const base::FilePath& media_cache_path, | 42 const base::FilePath& media_cache_path, |
| 43 int media_cache_max_size, | 43 int media_cache_max_size, |
| 44 const base::FilePath& extensions_cookie_path, | 44 const base::FilePath& extension_cookie_path, |
| 45 const base::FilePath& profile_path, | 45 const base::FilePath& profile_path, |
| 46 const base::FilePath& infinite_cache_path, | 46 const base::FilePath& infinite_cache_path, |
| 47 chrome_browser_net::Predictor* predictor, | 47 chrome_browser_net::Predictor* predictor, |
| 48 bool restore_old_session_cookies, | 48 bool restore_old_session_cookies, |
| 49 quota::SpecialStoragePolicy* special_storage_policy); | 49 quota::SpecialStoragePolicy* special_storage_policy); |
| 50 | 50 |
| 51 // These Create*ContextGetter() functions are only exposed because the | 51 // These Create*ContextGetter() functions are only exposed because the |
| 52 // circular relationship between Profile, ProfileIOData::Handle, and the | 52 // circular relationship between Profile, ProfileIOData::Handle, and the |
| 53 // ChromeURLRequestContextGetter factories requires Profile be able to call | 53 // ChromeURLRequestContextGetter factories requires Profile be able to call |
| 54 // these functions. | 54 // these functions. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 82 chrome_devtools_protocol_handler) const; | 82 chrome_devtools_protocol_handler) const; |
| 83 | 83 |
| 84 content::ResourceContext* GetResourceContext() const; | 84 content::ResourceContext* GetResourceContext() const; |
| 85 // GetResourceContextNoInit() does not call LazyInitialize() so it can be | 85 // GetResourceContextNoInit() does not call LazyInitialize() so it can be |
| 86 // safely be used during initialization. | 86 // safely be used during initialization. |
| 87 content::ResourceContext* GetResourceContextNoInit() const; | 87 content::ResourceContext* GetResourceContextNoInit() const; |
| 88 scoped_refptr<ChromeURLRequestContextGetter> | 88 scoped_refptr<ChromeURLRequestContextGetter> |
| 89 GetMediaRequestContextGetter() const; | 89 GetMediaRequestContextGetter() const; |
| 90 scoped_refptr<ChromeURLRequestContextGetter> | 90 scoped_refptr<ChromeURLRequestContextGetter> |
| 91 GetExtensionsRequestContextGetter() const; | |
| 92 scoped_refptr<ChromeURLRequestContextGetter> | |
| 93 GetIsolatedMediaRequestContextGetter( | 91 GetIsolatedMediaRequestContextGetter( |
| 94 const base::FilePath& partition_path, | 92 const base::FilePath& partition_path, |
| 95 bool in_memory) const; | 93 bool in_memory) const; |
| 96 | 94 |
| 97 // Deletes all network related data since |time|. It deletes transport | 95 // Deletes all network related data since |time|. It deletes transport |
| 98 // security state since |time| and also deletes HttpServerProperties data. | 96 // security state since |time| and also deletes HttpServerProperties data. |
| 99 // Works asynchronously, however if the |completion| callback is non-null, | 97 // Works asynchronously, however if the |completion| callback is non-null, |
| 100 // it will be posted on the UI thread once the removal process completes. | 98 // it will be posted on the UI thread once the removal process completes. |
| 101 void ClearNetworkingHistorySince(base::Time time, | 99 void ClearNetworkingHistorySince(base::Time time, |
| 102 const base::Closure& completion); | 100 const base::Closure& completion); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 LazyParams(); | 143 LazyParams(); |
| 146 ~LazyParams(); | 144 ~LazyParams(); |
| 147 | 145 |
| 148 // All of these parameters are intended to be read on the IO thread. | 146 // All of these parameters are intended to be read on the IO thread. |
| 149 base::FilePath cookie_path; | 147 base::FilePath cookie_path; |
| 150 base::FilePath server_bound_cert_path; | 148 base::FilePath server_bound_cert_path; |
| 151 base::FilePath cache_path; | 149 base::FilePath cache_path; |
| 152 int cache_max_size; | 150 int cache_max_size; |
| 153 base::FilePath media_cache_path; | 151 base::FilePath media_cache_path; |
| 154 int media_cache_max_size; | 152 int media_cache_max_size; |
| 155 base::FilePath extensions_cookie_path; | 153 base::FilePath extension_cookie_path; |
| 156 base::FilePath infinite_cache_path; | 154 base::FilePath infinite_cache_path; |
| 157 bool restore_old_session_cookies; | 155 bool restore_old_session_cookies; |
| 158 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; | 156 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; |
| 159 }; | 157 }; |
| 160 | 158 |
| 161 typedef base::hash_map<std::string, net::HttpTransactionFactory* > | 159 typedef base::hash_map<std::string, net::HttpTransactionFactory* > |
| 162 HttpTransactionFactoryMap; | 160 HttpTransactionFactoryMap; |
| 163 | 161 |
| 164 ProfileImplIOData(); | 162 ProfileImplIOData(); |
| 165 virtual ~ProfileImplIOData(); | 163 virtual ~ProfileImplIOData(); |
| 166 | 164 |
| 167 virtual void InitializeInternal( | 165 virtual void InitializeInternal( |
| 168 ProfileParams* profile_params, | 166 ProfileParams* profile_params, |
| 169 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 167 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 170 blob_protocol_handler, | 168 blob_protocol_handler, |
| 171 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 169 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 172 file_system_protocol_handler, | 170 file_system_protocol_handler, |
| 173 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 171 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 174 developer_protocol_handler, | 172 developer_protocol_handler, |
| 175 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 173 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 176 chrome_protocol_handler, | 174 chrome_protocol_handler, |
| 177 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 175 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 178 chrome_devtools_protocol_handler) const OVERRIDE; | 176 chrome_devtools_protocol_handler) const OVERRIDE; |
| 179 virtual void InitializeExtensionsRequestContext( | |
| 180 ProfileParams* profile_params) const OVERRIDE; | |
| 181 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 177 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
| 182 ChromeURLRequestContext* main_context, | 178 ChromeURLRequestContext* main_context, |
| 183 const StoragePartitionDescriptor& partition_descriptor, | 179 const StoragePartitionDescriptor& partition_descriptor, |
| 184 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 180 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 185 protocol_handler_interceptor, | 181 protocol_handler_interceptor, |
| 186 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 182 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 187 blob_protocol_handler, | 183 blob_protocol_handler, |
| 188 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 184 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 189 file_system_protocol_handler, | 185 file_system_protocol_handler, |
| 190 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 186 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 245 |
| 250 // Parameters needed for isolated apps. | 246 // Parameters needed for isolated apps. |
| 251 base::FilePath profile_path_; | 247 base::FilePath profile_path_; |
| 252 int app_cache_max_size_; | 248 int app_cache_max_size_; |
| 253 int app_media_cache_max_size_; | 249 int app_media_cache_max_size_; |
| 254 | 250 |
| 255 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 251 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
| 256 }; | 252 }; |
| 257 | 253 |
| 258 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 254 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
| OLD | NEW |