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

Unified Diff: chrome/browser/chromeos/power/power_prefs_unittest.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
Index: chrome/browser/chromeos/power/power_prefs_unittest.cc
diff --git a/chrome/browser/chromeos/power/power_prefs_unittest.cc b/chrome/browser/chromeos/power/power_prefs_unittest.cc
index 061dfbf66d82086cee29e49af9e3a9fa0344e390..4a46b4916af377a343c2768d2d06bef3180f145e 100644
--- a/chrome/browser/chromeos/power/power_prefs_unittest.cc
+++ b/chrome/browser/chromeos/power/power_prefs_unittest.cc
@@ -167,15 +167,8 @@ TEST_F(PowerPrefsTest, LoginScreen) {
builder.SetPath(
profile_manager_.profiles_dir().AppendASCII(chrome::kInitialProfile));
builder.SetPrefService(login_profile_prefs.PassAs<PrefServiceSyncable>());
- builder.SetIncognito();
- scoped_ptr<TestingProfile> login_profile_owner(builder.Build());
-
- TestingProfile* login_profile = login_profile_owner.get();
- TestingProfile* login_profile_parent = profile_manager_.CreateTestingProfile(
- chrome::kInitialProfile);
- login_profile_parent->SetOffTheRecordProfile(
- login_profile_owner.PassAs<Profile>());
- login_profile->SetOriginalProfile(login_profile_parent);
+ TestingProfile* login_profile = builder.BuildIncognito(
+ profile_manager_.CreateTestingProfile(chrome::kInitialProfile));
// Inform power_prefs_ that the login screen is being shown.
power_prefs_->Observe(chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,

Powered by Google App Engine
This is Rietveld 408576698