| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 55 scoped_refptr<ChromeURLRequestContextGetter> | 55 scoped_refptr<ChromeURLRequestContextGetter> |
| 56 CreateMainRequestContextGetter( | 56 CreateMainRequestContextGetter( |
| 57 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 57 content::ProtocolHandlerMap* protocol_handlers, |
| 58 blob_protocol_handler, | |
| 59 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 60 file_system_protocol_handler, | |
| 61 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 62 developer_protocol_handler, | |
| 63 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 64 chrome_protocol_handler, | |
| 65 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 66 chrome_devtools_protocol_handler, | |
| 67 PrefService* local_state, | 58 PrefService* local_state, |
| 68 IOThread* io_thread) const; | 59 IOThread* io_thread) const; |
| 69 scoped_refptr<ChromeURLRequestContextGetter> | 60 scoped_refptr<ChromeURLRequestContextGetter> |
| 70 CreateIsolatedAppRequestContextGetter( | 61 CreateIsolatedAppRequestContextGetter( |
| 71 const base::FilePath& partition_path, | 62 const base::FilePath& partition_path, |
| 72 bool in_memory, | 63 bool in_memory, |
| 73 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 64 content::ProtocolHandlerMap* protocol_handlers) const; |
| 74 blob_protocol_handler, | |
| 75 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 76 file_system_protocol_handler, | |
| 77 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 78 developer_protocol_handler, | |
| 79 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 80 chrome_protocol_handler, | |
| 81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 82 chrome_devtools_protocol_handler) const; | |
| 83 | 65 |
| 84 content::ResourceContext* GetResourceContext() const; | 66 content::ResourceContext* GetResourceContext() const; |
| 85 // GetResourceContextNoInit() does not call LazyInitialize() so it can be | 67 // GetResourceContextNoInit() does not call LazyInitialize() so it can be |
| 86 // safely be used during initialization. | 68 // safely be used during initialization. |
| 87 content::ResourceContext* GetResourceContextNoInit() const; | 69 content::ResourceContext* GetResourceContextNoInit() const; |
| 88 scoped_refptr<ChromeURLRequestContextGetter> | 70 scoped_refptr<ChromeURLRequestContextGetter> |
| 89 GetMediaRequestContextGetter() const; | 71 GetMediaRequestContextGetter() const; |
| 90 scoped_refptr<ChromeURLRequestContextGetter> | 72 scoped_refptr<ChromeURLRequestContextGetter> |
| 91 GetExtensionsRequestContextGetter() const; | 73 GetExtensionsRequestContextGetter() const; |
| 92 scoped_refptr<ChromeURLRequestContextGetter> | 74 scoped_refptr<ChromeURLRequestContextGetter> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 }; | 141 }; |
| 160 | 142 |
| 161 typedef base::hash_map<std::string, net::HttpTransactionFactory* > | 143 typedef base::hash_map<std::string, net::HttpTransactionFactory* > |
| 162 HttpTransactionFactoryMap; | 144 HttpTransactionFactoryMap; |
| 163 | 145 |
| 164 ProfileImplIOData(); | 146 ProfileImplIOData(); |
| 165 virtual ~ProfileImplIOData(); | 147 virtual ~ProfileImplIOData(); |
| 166 | 148 |
| 167 virtual void InitializeInternal( | 149 virtual void InitializeInternal( |
| 168 ProfileParams* profile_params, | 150 ProfileParams* profile_params, |
| 169 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 151 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; |
| 170 blob_protocol_handler, | |
| 171 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 172 file_system_protocol_handler, | |
| 173 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 174 developer_protocol_handler, | |
| 175 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 176 chrome_protocol_handler, | |
| 177 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 178 chrome_devtools_protocol_handler) const OVERRIDE; | |
| 179 virtual void InitializeExtensionsRequestContext( | 152 virtual void InitializeExtensionsRequestContext( |
| 180 ProfileParams* profile_params) const OVERRIDE; | 153 ProfileParams* profile_params) const OVERRIDE; |
| 181 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 154 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
| 182 ChromeURLRequestContext* main_context, | 155 ChromeURLRequestContext* main_context, |
| 183 const StoragePartitionDescriptor& partition_descriptor, | 156 const StoragePartitionDescriptor& partition_descriptor, |
| 184 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 157 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 185 protocol_handler_interceptor, | 158 protocol_handler_interceptor, |
| 186 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 159 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; |
| 187 blob_protocol_handler, | |
| 188 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 189 file_system_protocol_handler, | |
| 190 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 191 developer_protocol_handler, | |
| 192 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 193 chrome_protocol_handler, | |
| 194 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 195 chrome_devtools_protocol_handler) const OVERRIDE; | |
| 196 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 160 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
| 197 ChromeURLRequestContext* original_context, | 161 ChromeURLRequestContext* original_context, |
| 198 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; | 162 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; |
| 199 virtual ChromeURLRequestContext* | 163 virtual ChromeURLRequestContext* |
| 200 AcquireMediaRequestContext() const OVERRIDE; | 164 AcquireMediaRequestContext() const OVERRIDE; |
| 201 virtual ChromeURLRequestContext* | 165 virtual ChromeURLRequestContext* |
| 202 AcquireIsolatedAppRequestContext( | 166 AcquireIsolatedAppRequestContext( |
| 203 ChromeURLRequestContext* main_context, | 167 ChromeURLRequestContext* main_context, |
| 204 const StoragePartitionDescriptor& partition_descriptor, | 168 const StoragePartitionDescriptor& partition_descriptor, |
| 205 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 169 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 206 protocol_handler_interceptor, | 170 protocol_handler_interceptor, |
| 207 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 171 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; |
| 208 blob_protocol_handler, | |
| 209 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 210 file_system_protocol_handler, | |
| 211 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 212 developer_protocol_handler, | |
| 213 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 214 chrome_protocol_handler, | |
| 215 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 216 chrome_devtools_protocol_handler) const OVERRIDE; | |
| 217 virtual ChromeURLRequestContext* | 172 virtual ChromeURLRequestContext* |
| 218 AcquireIsolatedMediaRequestContext( | 173 AcquireIsolatedMediaRequestContext( |
| 219 ChromeURLRequestContext* app_context, | 174 ChromeURLRequestContext* app_context, |
| 220 const StoragePartitionDescriptor& partition_descriptor) | 175 const StoragePartitionDescriptor& partition_descriptor) |
| 221 const OVERRIDE; | 176 const OVERRIDE; |
| 222 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( | 177 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( |
| 223 IOThread::Globals* io_thread_globals) const OVERRIDE; | 178 IOThread::Globals* io_thread_globals) const OVERRIDE; |
| 224 | 179 |
| 225 // Deletes all network related data since |time|. It deletes transport | 180 // Deletes all network related data since |time|. It deletes transport |
| 226 // security state since |time| and also deletes HttpServerProperties data. | 181 // security state since |time| and also deletes HttpServerProperties data. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 249 | 204 |
| 250 // Parameters needed for isolated apps. | 205 // Parameters needed for isolated apps. |
| 251 base::FilePath profile_path_; | 206 base::FilePath profile_path_; |
| 252 int app_cache_max_size_; | 207 int app_cache_max_size_; |
| 253 int app_media_cache_max_size_; | 208 int app_media_cache_max_size_; |
| 254 | 209 |
| 255 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 210 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
| 256 }; | 211 }; |
| 257 | 212 |
| 258 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 213 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
| OLD | NEW |