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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 506153002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/prefs/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/prefs/profile_pref_store_manager_unittest.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
index 345987d0ec457627e9f785a0642d98226e9c31c0..9f26fd359ce74e6e0c8e92d5da69e07170abb713 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -91,13 +91,13 @@ class ProfilePrefStoreManagerTest : public testing::Test {
: configuration_(kConfiguration,
kConfiguration + arraysize(kConfiguration)),
profile_pref_registry_(new user_prefs::PrefRegistrySyncable),
- registry_verifier_(profile_pref_registry_),
+ registry_verifier_(profile_pref_registry_.get()),
gab 2014/08/26 19:29:56 RegistryVerifier() should take a scoped_refptr as
seed_("seed"),
reset_recorded_(false) {}
virtual void SetUp() OVERRIDE {
ProfilePrefStoreManager::RegisterPrefs(local_state_.registry());
- ProfilePrefStoreManager::RegisterProfilePrefs(profile_pref_registry_);
+ ProfilePrefStoreManager::RegisterProfilePrefs(profile_pref_registry_.get());
for (const PrefHashFilter::TrackedPreferenceMetadata* it = kConfiguration;
it != kConfiguration + arraysize(kConfiguration);
++it) {
@@ -152,7 +152,7 @@ class ProfilePrefStoreManagerTest : public testing::Test {
pref_service_factory.set_user_prefs(pref_store_);
scoped_ptr<PrefService> pref_service(
- pref_service_factory.Create(profile_pref_registry_));
+ pref_service_factory.Create(profile_pref_registry_.get()));
gab 2014/08/26 19:29:56 PrefServiceFactory::Create() should take a scoped_
EXPECT_EQ(
reset_expected,
@@ -166,7 +166,7 @@ class ProfilePrefStoreManagerTest : public testing::Test {
pref_service_factory.set_user_prefs(pref_store_);
scoped_ptr<PrefService> pref_service(
- pref_service_factory.Create(profile_pref_registry_));
+ pref_service_factory.Create(profile_pref_registry_.get()));
gab 2014/08/26 19:29:56 Same as above.
ProfilePrefStoreManager::ClearResetTime(pref_service.get());
}
@@ -180,13 +180,13 @@ class ProfilePrefStoreManagerTest : public testing::Test {
base::Bind(&ProfilePrefStoreManagerTest::RecordReset,
base::Unretained(this)),
&mock_validation_delegate_);
- InitializePrefStore(pref_store);
+ InitializePrefStore(pref_store.get());
pref_store = NULL;
base::RunLoop().RunUntilIdle();
}
void DestroyPrefStore() {
- if (pref_store_) {
+ if (pref_store_.get()) {
ClearResetRecorded();
// Force everything to be written to disk, triggering the PrefHashFilter
// while our RegistryVerifier is watching.
@@ -205,7 +205,7 @@ class ProfilePrefStoreManagerTest : public testing::Test {
scoped_refptr<PersistentPrefStore> pref_store =
manager_->CreateDeprecatedCombinedProfilePrefStore(
main_message_loop_.message_loop_proxy());
- InitializePrefStore(pref_store);
+ InitializePrefStore(pref_store.get());
pref_store = NULL;
base::RunLoop().RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698