Chromium Code Reviews| 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..2bc43ec62803a92f20af9a909d733dee77dca1c5 |
| --- /dev/null |
| +++ b/chrome/browser/prefs/pref_service_simple.h |
| @@ -0,0 +1,35 @@ |
| +// 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 { |
|
Mattias Nissler (ping if slow)
2012/12/19 19:50:22
Thinking more about these names: I'm wondering whe
Jói
2012/12/20 16:30:31
I think Syncable implies "can be synced" not "is s
Mattias Nissler (ping if slow)
2012/12/21 13:09:31
Yes, makes sense. Material for follow-up changes t
|
| + 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/20 13:41:52
needs a virtual dtor
Jói
2012/12/20 16:30:31
Done, also added DISALLOW_COPY_AND_ASSIGN.
|
| + |
| + // Constructs objects. |
| + friend class ChromePrefServiceFactory; |
| + friend class PrefServiceMockBuilder; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SIMPLE_H_ |