Index: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
index eced8327cf369fbfe5180e9858bd37de58f14a05..883be2703f6e6259fb90ddcd503bb07fa7fdb7fa 100644 |
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
@@ -145,12 +145,16 @@ TEST_F(PrefProviderTest, Incognito) { |
Profile::RegisterUserPrefs(otr_prefs); |
chrome::RegisterUserPrefs(otr_prefs); |
- TestingProfile profile; |
- TestingProfile* otr_profile = new TestingProfile; |
- profile.SetOffTheRecordProfile(otr_profile); |
- profile.SetPrefService(regular_prefs); |
+ TestingProfile::Builder profile_builder; |
+ profile_builder.SetPrefService(make_scoped_ptr(regular_prefs).Pass()); |
battre
2013/02/07 09:45:08
No need for calling ".Pass()"
Joe Thomas
2013/02/07 18:30:30
Done.
|
+ scoped_ptr<TestingProfile> profile = profile_builder.Build(); |
+ |
+ TestingProfile::Builder otr_profile_builder; |
+ otr_profile_builder.SetPrefService(make_scoped_ptr(otr_prefs).Pass()); |
battre
2013/02/07 09:45:08
No need for calling ".Pass()"
Joe Thomas
2013/02/07 18:30:30
Done.
|
+ TestingProfile* otr_profile = otr_profile_builder.Build().release(); |
+ |
otr_profile->set_incognito(true); |
- otr_profile->SetPrefService(otr_prefs); |
+ profile->SetOffTheRecordProfile(otr_profile); |
battre
2013/02/07 09:45:08
I think that this would be slightly cleaner:
Test
Joe Thomas
2013/02/07 14:22:54
I had tried it already and it was causing a DCHECK
|
PrefProvider pref_content_settings_provider(regular_prefs, false); |
PrefProvider pref_content_settings_provider_incognito(otr_prefs, true); |