Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index 46dbd95c943a9d32d8314e3d1e69c72161d861c4..3a7e5a2ab6736f6fadaf8c633fbe14eb4d14b325 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -545,8 +545,6 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) { |
| cache_max_size, media_cache_path, media_cache_max_size, |
| extensions_cookie_path, GetPath(), infinite_cache_path, |
| predictor_, |
| - g_browser_process->local_state(), |
| - g_browser_process->io_thread(), |
| restore_old_session_cookies, |
| GetSpecialStoragePolicy()); |
| @@ -831,8 +829,31 @@ FilePath ProfileImpl::GetPrefFilePath() { |
| return pref_file_path; |
| } |
| +net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + blob_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + file_system_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + developer_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + chrome_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + chrome_devtools_protocol_handler) { |
| + return io_data_.CreateMainRequestContextGetter( |
| + blob_protocol_handler.Pass(), |
| + file_system_protocol_handler.Pass(), |
| + developer_protocol_handler.Pass(), |
| + chrome_protocol_handler.Pass(), |
| + chrome_devtools_protocol_handler.Pass(), |
| + g_browser_process->local_state(), |
| + g_browser_process->io_thread()); |
| +} |
| + |
| net::URLRequestContextGetter* ProfileImpl::GetRequestContext() { |
| - return io_data_.GetMainRequestContextGetter(); |
| + content::StoragePartition* storage_partition = |
| + BrowserContext::GetStoragePartition(this, NULL); |
|
awong
2013/02/02 03:26:12
GetDefaultStoragePartition()
|
| + return storage_partition->GetURLRequestContext(); |
| } |
| net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( |
| @@ -874,10 +895,24 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
| return io_data_.GetExtensionsRequestContextGetter(); |
| } |
| -net::URLRequestContextGetter* ProfileImpl::GetRequestContextForStoragePartition( |
| +net::URLRequestContextGetter* |
| +ProfileImpl::CreateRequestContextForStoragePartition( |
| const FilePath& partition_path, |
| - bool in_memory) { |
| - return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory); |
| + bool in_memory, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + blob_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + file_system_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + developer_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + chrome_protocol_handler, |
| + scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| + chrome_devtools_protocol_handler) { |
| + return io_data_.CreateIsolatedAppRequestContextGetter( |
| + partition_path, in_memory, blob_protocol_handler.Pass(), |
| + file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), |
| + chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); |
| } |
| net::SSLConfigService* ProfileImpl::GetSSLConfigService() { |