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

Side by Side Diff: chrome/common/pref_store.h

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2010->2011 Created 9 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/persistent_pref_store.h ('k') | chrome/common/pref_store_observer_mock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 4
5 #ifndef CHROME_COMMON_PREF_STORE_H_ 5 #ifndef CHROME_COMMON_PREF_STORE_H_
6 #define CHROME_COMMON_PREF_STORE_H_ 6 #define CHROME_COMMON_PREF_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 class PrefStore : public base::RefCounted<PrefStore> { 23 class PrefStore : public base::RefCounted<PrefStore> {
24 public: 24 public:
25 // Observer interface for monitoring PrefStore. 25 // Observer interface for monitoring PrefStore.
26 class Observer { 26 class Observer {
27 public: 27 public:
28 virtual ~Observer() {} 28 virtual ~Observer() {}
29 29
30 // Called when the value for the given |key| in the store changes. 30 // Called when the value for the given |key| in the store changes.
31 virtual void OnPrefValueChanged(const std::string& key) = 0; 31 virtual void OnPrefValueChanged(const std::string& key) = 0;
32 // Notification about the PrefStore being fully initialized. 32 // Notification about the PrefStore being fully initialized.
33 virtual void OnInitializationCompleted() = 0; 33 virtual void OnInitializationCompleted(bool succeeded) = 0;
34 }; 34 };
35 35
36 // Return values for GetValue(). 36 // Return values for GetValue().
37 enum ReadResult { 37 enum ReadResult {
38 // Value found and returned. 38 // Value found and returned.
39 READ_OK, 39 READ_OK,
40 // No value present, but skip other pref stores and use default. 40 // No value present, but skip other pref stores and use default.
41 READ_USE_DEFAULT, 41 READ_USE_DEFAULT,
42 // No value present. 42 // No value present.
43 READ_NO_VALUE, 43 READ_NO_VALUE,
(...skipping 16 matching lines...) Expand all
60 60
61 protected: 61 protected:
62 friend class base::RefCounted<PrefStore>; 62 friend class base::RefCounted<PrefStore>;
63 virtual ~PrefStore() {} 63 virtual ~PrefStore() {}
64 64
65 private: 65 private:
66 DISALLOW_COPY_AND_ASSIGN(PrefStore); 66 DISALLOW_COPY_AND_ASSIGN(PrefStore);
67 }; 67 };
68 68
69 #endif // CHROME_COMMON_PREF_STORE_H_ 69 #endif // CHROME_COMMON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « chrome/common/persistent_pref_store.h ('k') | chrome/common/pref_store_observer_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698