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

Unified Diff: chrome/browser/prefs/pref_service_syncable_builder.h

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
Index: chrome/browser/prefs/pref_service_syncable_builder.h
diff --git a/chrome/browser/prefs/pref_service_syncable_builder.h b/chrome/browser/prefs/pref_service_syncable_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..1dfb9acac2f2f159cd1b1b1aabb96589c83f6f6a
--- /dev/null
+++ b/chrome/browser/prefs/pref_service_syncable_builder.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_
+#define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_
+
+#include "chrome/browser/prefs/pref_service_builder.h"
+
+class CommandLine;
+class PrefServiceSyncable;
+
+namespace policy {
+class PolicyService;
+}
+
+// A PrefServiceBuilder that also knows how to build a
+// PrefServiceSyncable, and may know about Chrome concepts such as
+// PolicyService.
+class PrefServiceSyncableBuilder : public PrefServiceBuilder {
+ public:
+ PrefServiceSyncableBuilder();
+ virtual ~PrefServiceSyncableBuilder();
+
+#if defined(ENABLE_CONFIGURATION_POLICY)
+ // Set up policy pref stores using the given policy service.
+ PrefServiceSyncableBuilder& WithManagedPolicies(
+ policy::PolicyService* service);
+ PrefServiceSyncableBuilder& WithRecommendedPolicies(
+ policy::PolicyService* service);
+#endif
+
+ // Specifies to use an actual command-line backed command-line pref store.
+ PrefServiceSyncableBuilder& WithCommandLine(CommandLine* command_line);
+
+ virtual PrefServiceSyncable* CreateSyncable();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableBuilder);
+};
+
+#endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_BUILDER_H_
« no previous file with comments | « chrome/browser/prefs/pref_service_syncable.cc ('k') | chrome/browser/prefs/pref_service_syncable_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698