Index: chrome/browser/prefs/pref_service_mock_builder.cc |
diff --git a/chrome/browser/prefs/pref_service_mock_builder.cc b/chrome/browser/prefs/pref_service_mock_builder.cc |
index ce7f4477aeb4d536e2b78db5b49d22ca113b3681..fb8b7218cf823eaa31ebacc40d07f72ef3f23711 100644 |
--- a/chrome/browser/prefs/pref_service_mock_builder.cc |
+++ b/chrome/browser/prefs/pref_service_mock_builder.cc |
@@ -4,55 +4,24 @@ |
#include "chrome/browser/prefs/pref_service_mock_builder.h" |
-#include "base/bind.h" |
-#include "base/message_loop_proxy.h" |
-#include "base/prefs/default_pref_store.h" |
-#include "base/prefs/json_pref_store.h" |
#include "base/prefs/testing_pref_store.h" |
-#include "chrome/browser/policy/configuration_policy_pref_store.h" |
-#include "chrome/browser/prefs/command_line_pref_store.h" |
-#include "chrome/browser/prefs/pref_notifier_impl.h" |
-#include "chrome/browser/prefs/pref_service.h" |
-#include "chrome/browser/prefs/pref_value_store.h" |
-#include "content/public/browser/browser_thread.h" |
-#include "ui/base/l10n/l10n_util.h" |
- |
-using content::BrowserThread; |
PrefServiceMockBuilder::PrefServiceMockBuilder() { |
- ResetTestingState(); |
+ ResetDefaultState(); |
} |
PrefServiceMockBuilder::~PrefServiceMockBuilder() {} |
-#if defined(ENABLE_CONFIGURATION_POLICY) |
-PrefServiceMockBuilder& PrefServiceMockBuilder::WithManagedPolicies( |
- policy::PolicyService* service) { |
- WithManagedPrefs(new policy::ConfigurationPolicyPrefStore( |
- service, policy::POLICY_LEVEL_MANDATORY)); |
- return *this; |
-} |
- |
-PrefServiceMockBuilder& PrefServiceMockBuilder::WithRecommendedPolicies( |
- policy::PolicyService* service) { |
- WithRecommendedPrefs(new policy::ConfigurationPolicyPrefStore( |
- service, policy::POLICY_LEVEL_RECOMMENDED)); |
- return *this; |
-} |
-#endif |
- |
-PrefServiceMockBuilder& |
-PrefServiceMockBuilder::WithCommandLine(CommandLine* command_line) { |
- WithCommandLinePrefs(new CommandLinePrefStore(command_line)); |
- return *this; |
+PrefServiceSimple* PrefServiceMockBuilder::CreateSimple() { |
+ PrefServiceSimple* service = PrefServiceBuilder::CreateSimple(); |
+ return service; |
} |
-PrefService* PrefServiceMockBuilder::Create() { |
- PrefService* pref_service = PrefServiceBuilder::Create(); |
- ResetTestingState(); |
- return pref_service; |
+PrefServiceSyncable* PrefServiceMockBuilder::CreateSyncable() { |
+ PrefServiceSyncable* service = PrefServiceSyncableBuilder::CreateSyncable(); |
+ return service; |
} |
-void PrefServiceMockBuilder::ResetTestingState() { |
+void PrefServiceMockBuilder::ResetDefaultState() { |
user_prefs_ = new TestingPrefStore; |
} |