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

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

Issue 10735042: Revert 145969 - Removing last usage of default request context. Fixing up login_utils to not need i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 145994)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -513,6 +513,11 @@
ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
io_data_.GetResourceContextNoInit());
+ if (io_data_.HasMainRequestContext() &&
+ default_request_context_ == GetRequestContext()) {
+ default_request_context_ = NULL;
+ }
+
// Destroy OTR profile and its profile services first.
if (off_the_record_profile_.get()) {
ProfileDestroyer::DestroyOffTheRecordProfileNow(
@@ -698,7 +703,15 @@
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
- return io_data_.GetMainRequestContextGetter();
+ net::URLRequestContextGetter* request_context =
+ io_data_.GetMainRequestContextGetter();
+ // The first request context is always a normal (non-OTR) request context.
+ // Even when Chromium is started in OTR mode, a normal profile is always
+ // created first.
+ if (!default_request_context_)
+ default_request_context_ = request_context;
+
+ return request_context;
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698