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

Unified Diff: chrome/test/base/testing_profile_manager.cc

Issue 556173002: Ensure incognito TestingProfiles are incognito for their whole lifetime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 6 years, 3 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/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile_manager.cc
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 0bbc4ee6c65fe56ac85b9d8c3b883880d1598a59..2d49f6db3679fc2b34919cb26915f6bfe630d98c 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -118,11 +118,6 @@ TestingProfile* TestingProfileManager::CreateTestingProfile(
TestingProfile* TestingProfileManager::CreateGuestProfile() {
DCHECK(called_set_up_);
- // Set up a profile with an off the record profile.
- TestingProfile::Builder otr_builder;
- otr_builder.SetIncognito();
- scoped_ptr<TestingProfile> otr_profile(otr_builder.Build());
-
// Create the profile and register it.
TestingProfile::Builder builder;
builder.SetGuestSession();
@@ -132,8 +127,9 @@ TestingProfile* TestingProfileManager::CreateGuestProfile() {
TestingProfile* profile = builder.Build().release();
profile->set_profile_name(kGuestProfileName);
- otr_profile->SetOriginalProfile(profile);
- profile->SetOffTheRecordProfile(otr_profile.PassAs<Profile>());
+ // Set up a profile with an off the record profile.
+ TestingProfile::Builder().BuildIncognito(profile);
+
profile_manager_->AddProfile(profile); // Takes ownership.
profile_manager_->SetGuestProfilePrefs(profile);
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698