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

Side by Side Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 2778733003: Pref service: delete old implementation (Closed)
Patch Set: Fix missed merge Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/profile_pref_store_manager.h" 5 #include "chrome/browser/prefs/profile_pref_store_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (GetParam()) { 147 if (GetParam()) {
148 feature_list_.InitAndEnableFeature(features::kPrefService); 148 feature_list_.InitAndEnableFeature(features::kPrefService);
149 service_manager::mojom::ServicePtr service_ptr; 149 service_manager::mojom::ServicePtr service_ptr;
150 pref_service_context_ = base::MakeUnique<service_manager::ServiceContext>( 150 pref_service_context_ = base::MakeUnique<service_manager::ServiceContext>(
151 prefs::CreatePrefService(std::set<PrefValueStore::PrefStoreType>(), 151 prefs::CreatePrefService(std::set<PrefValueStore::PrefStoreType>(),
152 worker_pool_->pool()), 152 worker_pool_->pool()),
153 mojo::MakeRequest(&service_ptr)); 153 mojo::MakeRequest(&service_ptr));
154 connector_ = service_manager::Connector::Create(&connector_request_); 154 connector_ = service_manager::Connector::Create(&connector_request_);
155 service_manager::Connector::TestApi test_api(connector_.get()); 155 service_manager::Connector::TestApi test_api(connector_.get());
156 test_api.OverrideBinderForTesting( 156 test_api.OverrideBinderForTesting(
157 prefs::mojom::kPrefStoreServiceName, 157 prefs::mojom::kServiceName, prefs::mojom::PrefStoreConnector::Name_,
158 prefs::mojom::PrefStoreConnector::Name_,
159 base::Bind(&ProfilePrefStoreManagerTest::BindInterface, 158 base::Bind(&ProfilePrefStoreManagerTest::BindInterface,
160 base::Unretained(this), 159 base::Unretained(this),
161 prefs::mojom::PrefStoreConnector::Name_)); 160 prefs::mojom::PrefStoreConnector::Name_));
162 test_api.OverrideBinderForTesting( 161 test_api.OverrideBinderForTesting(
163 prefs::mojom::kPrefStoreServiceName, 162 prefs::mojom::kServiceName, prefs::mojom::PrefServiceControl::Name_,
164 prefs::mojom::PrefServiceControl::Name_,
165 base::Bind(&ProfilePrefStoreManagerTest::BindInterface, 163 base::Bind(&ProfilePrefStoreManagerTest::BindInterface,
166 base::Unretained(this), 164 base::Unretained(this),
167 prefs::mojom::PrefServiceControl::Name_)); 165 prefs::mojom::PrefServiceControl::Name_));
168 } else { 166 } else {
169 feature_list_.InitAndDisableFeature(features::kPrefService); 167 feature_list_.InitAndDisableFeature(features::kPrefService);
170 } 168 }
171 mock_validation_delegate_record_ = new MockValidationDelegateRecord; 169 mock_validation_delegate_record_ = new MockValidationDelegateRecord;
172 ProfilePrefStoreManager::RegisterProfilePrefs(profile_pref_registry_.get()); 170 ProfilePrefStoreManager::RegisterProfilePrefs(profile_pref_registry_.get());
173 for (const PrefHashFilter::TrackedPreferenceMetadata* it = kConfiguration; 171 for (const PrefHashFilter::TrackedPreferenceMetadata* it = kConfiguration;
174 it != kConfiguration + arraysize(kConfiguration); 172 it != kConfiguration + arraysize(kConfiguration);
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 base::WrapUnique(new base::Value(kGoodbyeWorld)), 617 base::WrapUnique(new base::Value(kGoodbyeWorld)),
620 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 618 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
621 LoadExistingPrefs(); 619 LoadExistingPrefs();
622 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld); 620 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld);
623 VerifyResetRecorded(false); 621 VerifyResetRecorded(false);
624 } 622 }
625 623
626 INSTANTIATE_TEST_CASE_P(ProfilePrefStoreManagerTest, 624 INSTANTIATE_TEST_CASE_P(ProfilePrefStoreManagerTest,
627 ProfilePrefStoreManagerTest, 625 ProfilePrefStoreManagerTest,
628 testing::Bool()); 626 testing::Bool());
OLDNEW
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698