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

Unified Diff: chrome/browser/chromeos/power/power_prefs_unittest.cc

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android fixes. Created 7 years, 4 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 6b3cd2d2c0689d5625a49207be190086da82a2c7..455fd3c32c86d6bff59611bf1a2fa5a1f6e34a72 100644
--- a/chrome/browser/chromeos/power/power_prefs_unittest.cc
+++ b/chrome/browser/chromeos/power/power_prefs_unittest.cc
@@ -152,17 +152,19 @@ TEST_F(PowerPrefsTest, LoginScreen) {
scoped_ptr<TestingPrefServiceSyncable> login_profile_prefs(
new TestingPrefServiceSyncable);
chrome::RegisterLoginProfilePrefs(login_profile_prefs->registry());
- scoped_ptr<TestingProfile> login_profile_owner(new TestingProfile(
- profile_manager_.profiles_dir().AppendASCII(chrome::kInitialProfile),
- NULL,
- scoped_refptr<ExtensionSpecialStoragePolicy>(),
- scoped_ptr<PrefServiceSyncable>(login_profile_prefs.release())));
+ TestingProfile::Builder builder;
+ 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();
awong 2013/08/16 17:53:16 scoped_ptr<TestingProfile> login_profile_owner(bui
Andrew T Wilson (Slow) 2013/08/19 12:15:56 Done, but is there a reason why this is better? I
awong 2013/08/19 19:47:21 Guess it doesn't really matter too much. In an opt
+
TestingProfile* login_profile = login_profile_owner.get();
TestingProfile* login_profile_parent = profile_manager_.CreateTestingProfile(
chrome::kInitialProfile);
- login_profile_parent->SetOffTheRecordProfile(login_profile_owner.release());
+ login_profile_parent->SetOffTheRecordProfile(
+ login_profile_owner.PassAs<Profile>());
login_profile->SetOriginalProfile(login_profile_parent);
- login_profile->set_incognito(true);
// 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