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

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

Issue 187043003: Fixes crashes related to reusing guest mode profiles and/or user manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac tests Created 6 years, 10 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 | « no previous file | chrome/test/base/testing_profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index f60ced7f095ae533043748ec68448019f21fb309..350c0291bf51b628566d2c254e2eff4869221446 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -383,9 +383,11 @@ void ProfileManager::CreateProfileAsync(
if (!callback.is_null()) {
if (iter != profiles_info_.end() && info->created) {
Profile* profile = info->profile.get();
- // If this was the guest profile, apply settings.
- if (profile->GetPath() == ProfileManager::GetGuestProfilePath())
+ // If this was the guest profile, apply settings and go OffTheRecord.
+ if (profile->GetPath() == ProfileManager::GetGuestProfilePath()) {
SetGuestProfilePrefs(profile);
+ profile = profile->GetOffTheRecordProfile();
+ }
// Profile has already been created. Run callback immediately.
callback.Run(profile, Profile::CREATE_STATUS_INITIALIZED);
} else {
« no previous file with comments | « no previous file | chrome/test/base/testing_profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698