| Index: chrome/browser/profiles/profile_impl_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
|
| index f4ee92346904023a2a19e4a612e3a26924343dbe..3e8750945e8c48ebbc730ff480e4c0c32adf17e7 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -74,7 +74,7 @@ void ProfileImplIOData::Handle::Init(
|
| int cache_max_size,
|
| const base::FilePath& media_cache_path,
|
| int media_cache_max_size,
|
| - const base::FilePath& extensions_cookie_path,
|
| + const base::FilePath& extension_cookie_path,
|
| const base::FilePath& profile_path,
|
| const base::FilePath& infinite_cache_path,
|
| chrome_browser_net::Predictor* predictor,
|
| @@ -92,7 +92,7 @@ void ProfileImplIOData::Handle::Init(
|
| lazy_params->cache_max_size = cache_max_size;
|
| lazy_params->media_cache_path = media_cache_path;
|
| lazy_params->media_cache_max_size = media_cache_max_size;
|
| - lazy_params->extensions_cookie_path = extensions_cookie_path;
|
| + lazy_params->extension_cookie_path = extension_cookie_path;
|
| lazy_params->infinite_cache_path = infinite_cache_path;
|
| lazy_params->restore_old_session_cookies = restore_old_session_cookies;
|
| lazy_params->special_storage_policy = special_storage_policy;
|
| @@ -173,18 +173,6 @@ ProfileImplIOData::Handle::GetMediaRequestContextGetter() const {
|
| }
|
|
|
| scoped_refptr<ChromeURLRequestContextGetter>
|
| -ProfileImplIOData::Handle::GetExtensionsRequestContextGetter() const {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - LazyInitialize();
|
| - if (!extensions_request_context_getter_) {
|
| - extensions_request_context_getter_ =
|
| - ChromeURLRequestContextGetter::CreateOriginalForExtensions(
|
| - profile_, io_data_);
|
| - }
|
| - return extensions_request_context_getter_;
|
| -}
|
| -
|
| -scoped_refptr<ChromeURLRequestContextGetter>
|
| ProfileImplIOData::Handle::CreateIsolatedAppRequestContextGetter(
|
| const base::FilePath& partition_path,
|
| bool in_memory,
|
| @@ -471,7 +459,14 @@ void ProfileImplIOData::InitializeInternal(
|
| main_context->set_job_factory(main_job_factory_.get());
|
|
|
| #if defined(ENABLE_EXTENSIONS)
|
| - InitializeExtensionsRequestContext(profile_params);
|
| + extension_cookie_store_ =
|
| + new net::CookieMonster(
|
| + new SQLitePersistentCookieStore(
|
| + lazy_params_->extension_cookie_path,
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
| + BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
|
| + BrowserThread::GetBlockingPool()->GetSequenceToken()),
|
| + lazy_params_->restore_old_session_cookies, NULL), NULL);
|
| #endif
|
|
|
| // Create a media request context based on the main context, but using a
|
| @@ -483,56 +478,6 @@ void ProfileImplIOData::InitializeInternal(
|
| lazy_params_.reset();
|
| }
|
|
|
| -void ProfileImplIOData::
|
| - InitializeExtensionsRequestContext(ProfileParams* profile_params) const {
|
| - ChromeURLRequestContext* extensions_context = extensions_request_context();
|
| - IOThread* const io_thread = profile_params->io_thread;
|
| - IOThread::Globals* const io_thread_globals = io_thread->globals();
|
| - ApplyProfileParamsToContext(extensions_context);
|
| -
|
| - extensions_context->set_transport_security_state(transport_security_state());
|
| -
|
| - extensions_context->set_net_log(io_thread->net_log());
|
| -
|
| - extensions_context->set_throttler_manager(
|
| - io_thread_globals->throttler_manager.get());
|
| -
|
| - net::CookieMonster* extensions_cookie_store =
|
| - new net::CookieMonster(
|
| - new SQLitePersistentCookieStore(
|
| - lazy_params_->extensions_cookie_path,
|
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
| - BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
|
| - BrowserThread::GetBlockingPool()->GetSequenceToken()),
|
| - lazy_params_->restore_old_session_cookies, NULL), NULL);
|
| - // Enable cookies for devtools and extension URLs.
|
| - const char* schemes[] = {chrome::kChromeDevToolsScheme,
|
| - extensions::kExtensionScheme};
|
| - extensions_cookie_store->SetCookieableSchemes(schemes, 2);
|
| - extensions_context->set_cookie_store(extensions_cookie_store);
|
| -
|
| -#if !defined(DISABLE_FTP_SUPPORT)
|
| - DCHECK(ftp_factory_.get());
|
| - extensions_context->set_ftp_transaction_factory(ftp_factory_.get());
|
| -#endif // !defined(DISABLE_FTP_SUPPORT)
|
| -
|
| - scoped_ptr<net::URLRequestJobFactoryImpl> extensions_job_factory(
|
| - new net::URLRequestJobFactoryImpl());
|
| - // TODO(shalev): The extensions_job_factory has a NULL NetworkDelegate.
|
| - // Without a network_delegate, this protocol handler will never
|
| - // handle file: requests, but as a side effect it makes
|
| - // job_factory::IsHandledProtocol return true, which prevents attempts to
|
| - // handle the protocol externally. We pass NULL in to
|
| - // SetUpJobFactory() to get this effect.
|
| - extensions_job_factory_ = SetUpJobFactoryDefaults(
|
| - extensions_job_factory.Pass(),
|
| - scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>(NULL),
|
| - NULL,
|
| - extensions_context->ftp_transaction_factory(),
|
| - extensions_context->ftp_auth_cache());
|
| - extensions_context->set_job_factory(extensions_job_factory_.get());
|
| -}
|
| -
|
| ChromeURLRequestContext*
|
| ProfileImplIOData::InitializeAppRequestContext(
|
| ChromeURLRequestContext* main_context,
|
|
|