OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | |
5 #ifndef CHROME_BROWSER_DUMMY_PREF_STORE_H_ | 4 #ifndef CHROME_BROWSER_DUMMY_PREF_STORE_H_ |
6 #define CHROME_BROWSER_DUMMY_PREF_STORE_H_ | 5 #define CHROME_BROWSER_DUMMY_PREF_STORE_H_ |
7 | 6 |
8 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
9 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
10 #include "chrome/browser/pref_store.h" | 9 #include "chrome/browser/pref_store.h" |
11 | 10 |
12 class DummyPrefStore : public PrefStore { | 11 class DummyPrefStore : public PrefStore { |
13 public: | 12 public: |
14 DummyPrefStore(); | 13 DummyPrefStore(); |
15 | 14 |
16 virtual DictionaryValue* Prefs() { return prefs_.get(); } | 15 virtual DictionaryValue* prefs() { return prefs_.get(); } |
17 void SetPrefs(DictionaryValue* prefs) { prefs_.reset(prefs); } | 16 void SetPrefs(DictionaryValue* prefs) { prefs_.reset(prefs); } |
18 | 17 |
19 virtual PrefStore::PrefReadError ReadPrefs(); | 18 virtual PrefStore::PrefReadError ReadPrefs(); |
20 | 19 |
21 private: | 20 private: |
22 scoped_ptr<DictionaryValue> prefs_; | 21 scoped_ptr<DictionaryValue> prefs_; |
23 | 22 |
24 DISALLOW_COPY_AND_ASSIGN(DummyPrefStore); | 23 DISALLOW_COPY_AND_ASSIGN(DummyPrefStore); |
25 }; | 24 }; |
26 | 25 |
27 #endif // CHROME_BROWSER_DUMMY_PREF_STORE_H_ | 26 #endif // CHROME_BROWSER_DUMMY_PREF_STORE_H_ |
OLD | NEW |