Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4888)

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index dfe2a8b1e19b928a7da88394907faf3bccb9f12a..3c8e1c3fb0d49ed794c635bc00e9f83da24868f5 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -97,18 +97,6 @@ OffTheRecordProfileIOData::Handle::CreateMainRequestContextGetter(
}
scoped_refptr<ChromeURLRequestContextGetter>
-OffTheRecordProfileIOData::Handle::GetExtensionsRequestContextGetter() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- LazyInitialize();
- if (!extensions_request_context_getter_) {
- extensions_request_context_getter_ =
- ChromeURLRequestContextGetter::CreateOffTheRecordForExtensions(
- profile_, io_data_);
- }
- return extensions_request_context_getter_;
-}
-
-scoped_refptr<ChromeURLRequestContextGetter>
OffTheRecordProfileIOData::Handle::GetIsolatedAppRequestContextGetter(
const base::FilePath& partition_path,
bool in_memory) const {
@@ -278,58 +266,11 @@ void OffTheRecordProfileIOData::InitializeInternal(
main_context->set_job_factory(main_job_factory_.get());
#if defined(ENABLE_EXTENSIONS)
- InitializeExtensionsRequestContext(profile_params);
+ // For incognito, extensions also use a non-persistent cookie store.
+ extension_cookie_store_ = new net::CookieMonster(NULL, NULL);
#endif
}
-void OffTheRecordProfileIOData::
- 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());
-
- // All we care about for extensions is the cookie store. For incognito, we
- // use a non-persistent cookie store.
- net::CookieMonster* extensions_cookie_store =
- new net::CookieMonster(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
- // SetUpJobFactoryDefaults() 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*
OffTheRecordProfileIOData::InitializeAppRequestContext(
ChromeURLRequestContext* main_context,

Powered by Google App Engine
This is Rietveld 408576698