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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. 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_simple.h
diff --git a/chrome/browser/prefs/pref_service_simple.h b/chrome/browser/prefs/pref_service_simple.h
new file mode 100644
index 0000000000000000000000000000000000000000..21db07bccd2e01019f3464365ac588e08f3f4654
--- /dev/null
+++ b/chrome/browser/prefs/pref_service_simple.h
@@ -0,0 +1,38 @@
+// 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_SIMPLE_H_
+#define CHROME_BROWSER_PREFS_PREF_SERVICE_SIMPLE_H_
+
+#include "chrome/browser/prefs/pref_service.h"
+
+// A simple PrefService implementation.
+class PrefServiceSimple : public PrefService {
+ public:
+ void RegisterBooleanPref(const char* path, bool default_value);
+ void RegisterIntegerPref(const char* path, int default_value);
+ void RegisterDoublePref(const char* path, double default_value);
+ void RegisterStringPref(const char* path, const std::string& default_value);
+ void RegisterFilePathPref(const char* path, const FilePath& default_value);
+ void RegisterListPref(const char* path);
+ void RegisterDictionaryPref(const char* path);
+ void RegisterListPref(const char* path, base::ListValue* default_value);
+ void RegisterDictionaryPref(
+ const char* path, base::DictionaryValue* default_value);
+ void RegisterInt64Pref(const char* path,
+ int64 default_value);
+ protected:
+ // Only use ChromePrefServiceFactory to create initialized PrefServiceSimple
+ // objects.
+ PrefServiceSimple();
Mattias Nissler (ping if slow) 2012/12/21 13:09:31 still needs a virtual dtor (I thought there was ag
Jói 2012/12/21 14:34:13 Done.
+
+ // Constructs objects.
+ friend class ChromePrefServiceFactory;
+ friend class PrefServiceMockBuilder;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PrefServiceSimple);
+};
+
+#endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SIMPLE_H_

Powered by Google App Engine
This is Rietveld 408576698