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

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

Issue 9251026: Reinitialize LocalState's CommandLinePrefStore after about_flags updates the command line. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix presubmit checks, no code change Created 8 years, 11 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/json_pref_store.cc ('k') | chrome/common/pref_store.cc » ('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) 2012 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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 READ_USE_DEFAULT, 43 READ_USE_DEFAULT,
44 // No value present. 44 // No value present.
45 READ_NO_VALUE, 45 READ_NO_VALUE,
46 }; 46 };
47 47
48 PrefStore() {} 48 PrefStore() {}
49 49
50 // Add and remove observers. 50 // Add and remove observers.
51 virtual void AddObserver(Observer* observer) {} 51 virtual void AddObserver(Observer* observer) {}
52 virtual void RemoveObserver(Observer* observer) {} 52 virtual void RemoveObserver(Observer* observer) {}
53 virtual size_t NumberOfObservers() const;
53 54
54 // Whether the store has completed all asynchronous initialization. 55 // Whether the store has completed all asynchronous initialization.
55 virtual bool IsInitializationComplete() const; 56 virtual bool IsInitializationComplete() const;
56 57
57 // Get the value for a given preference |key| and stores it in |*result|. 58 // Get the value for a given preference |key| and stores it in |*result|.
58 // |*result| is only modified if the return value is READ_OK and if |result| 59 // |*result| is only modified if the return value is READ_OK and if |result|
59 // is not NULL. Ownership of the |*result| value remains with the PrefStore. 60 // is not NULL. Ownership of the |*result| value remains with the PrefStore.
60 virtual ReadResult GetValue(const std::string& key, 61 virtual ReadResult GetValue(const std::string& key,
61 const base::Value** result) const = 0; 62 const base::Value** result) const = 0;
62 63
63 protected: 64 protected:
64 friend class base::RefCounted<PrefStore>; 65 friend class base::RefCounted<PrefStore>;
65 virtual ~PrefStore() {} 66 virtual ~PrefStore() {}
66 67
67 private: 68 private:
68 DISALLOW_COPY_AND_ASSIGN(PrefStore); 69 DISALLOW_COPY_AND_ASSIGN(PrefStore);
69 }; 70 };
70 71
71 #endif // CHROME_COMMON_PREF_STORE_H_ 72 #endif // CHROME_COMMON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « chrome/common/json_pref_store.cc ('k') | chrome/common/pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698