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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 64193003: Clean up PrefServiceBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory ownership bug in ProxyPolicyTest Created 7 years, 1 month 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/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index a61e8baf5af955bc951409bee3e2c00531bca2fa..78fad9ec0e7f65f84334d8e7cd8eb2e559f09a84 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -65,7 +65,7 @@
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/prefs/browser_prefs.h"
-#include "chrome/browser/prefs/pref_service_mock_builder.h"
+#include "chrome/browser/prefs/pref_service_mock_factory.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
@@ -480,16 +480,16 @@ void ExtensionServiceTestBase::InitializeExtensionService(
const ExtensionServiceTestBase::ExtensionServiceInitParams& params) {
TestingProfile::Builder profile_builder;
// Create a PrefService that only contains user defined preference values.
- PrefServiceMockBuilder builder;
+ PrefServiceMockFactory factory;
// If pref_file is empty, TestingProfile automatically creates
// TestingPrefServiceSyncable instance.
if (!params.pref_file.empty()) {
- builder.WithUserFilePrefs(params.pref_file,
- base::MessageLoopProxy::current().get());
+ factory.SetUserPrefsFile(params.pref_file,
+ base::MessageLoopProxy::current().get());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
scoped_ptr<PrefServiceSyncable> prefs(
- builder.CreateSyncable(registry.get()));
+ factory.CreateSyncable(registry.get()));
chrome::RegisterUserProfilePrefs(registry.get());
profile_builder.SetPrefService(prefs.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698