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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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
« no previous file with comments | « chrome/browser/prefs/pref_service_mock_builder.h ('k') | chrome/browser/prefs/pref_service_simple.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/browser/prefs/pref_service_mock_builder.h ('k') | chrome/browser/prefs/pref_service_simple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698