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

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

Issue 7342043: Fixed regression: various preferences were not persisted when changed from incognito window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 5 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/pref_names.cc ('k') | no next file » | 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 53
54 // Whether the store has completed all asynchronous initialization. 54 // Whether the store has completed all asynchronous initialization.
55 virtual bool IsInitializationComplete() const; 55 virtual bool IsInitializationComplete() const;
56 56
57 // Get the value for a given preference |key| and stores it in |result|. 57 // 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. Ownership of the 58 // |*result| is only modified if the return value is READ_OK and if |result|
59 // |result| value remains with the PrefStore. 59 // is not NULL. Ownership of the |*result| value remains with the PrefStore.
60 virtual ReadResult GetValue(const std::string& key, 60 virtual ReadResult GetValue(const std::string& key,
61 const base::Value** result) const = 0; 61 const base::Value** result) const = 0;
62 62
63 protected: 63 protected:
64 friend class base::RefCounted<PrefStore>; 64 friend class base::RefCounted<PrefStore>;
65 virtual ~PrefStore() {} 65 virtual ~PrefStore() {}
66 66
67 private: 67 private:
68 DISALLOW_COPY_AND_ASSIGN(PrefStore); 68 DISALLOW_COPY_AND_ASSIGN(PrefStore);
69 }; 69 };
70 70
71 #endif // CHROME_COMMON_PREF_STORE_H_ 71 #endif // CHROME_COMMON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698