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

Side by Side Diff: chrome/browser/prefs/overlay_persistent_pref_store.h

Issue 6713032: Provide lazy CommitPendingWrites in addition to eager SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed notification + rebase Created 9 years, 9 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
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_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ 5 #ifndef CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_
6 #define CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ 6 #define CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 virtual ReadResult GetValue(const std::string& key, Value** result) const; 36 virtual ReadResult GetValue(const std::string& key, Value** result) const;
37 37
38 // Methods of PersistentPrefStore. 38 // Methods of PersistentPrefStore.
39 virtual void SetValue(const std::string& key, Value* value); 39 virtual void SetValue(const std::string& key, Value* value);
40 virtual void SetValueSilently(const std::string& key, Value* value); 40 virtual void SetValueSilently(const std::string& key, Value* value);
41 virtual void RemoveValue(const std::string& key); 41 virtual void RemoveValue(const std::string& key);
42 virtual bool ReadOnly() const; 42 virtual bool ReadOnly() const;
43 virtual PrefReadError ReadPrefs(); 43 virtual PrefReadError ReadPrefs();
44 virtual bool WritePrefs(); 44 virtual bool WritePrefs();
45 virtual void ScheduleWritePrefs(); 45 virtual void ScheduleWritePrefs();
46 virtual void CommitPendingWrite();
46 // TODO(battre) remove this function 47 // TODO(battre) remove this function
47 virtual void ReportValueChanged(const std::string& key); 48 virtual void ReportValueChanged(const std::string& key);
48 49
49 private: 50 private:
50 // Methods of PrefStore::Observer. 51 // Methods of PrefStore::Observer.
51 virtual void OnPrefValueChanged(const std::string& key); 52 virtual void OnPrefValueChanged(const std::string& key);
52 virtual void OnInitializationCompleted(); 53 virtual void OnInitializationCompleted();
53 54
54 ObserverList<PrefStore::Observer, true> observers_; 55 ObserverList<PrefStore::Observer, true> observers_;
55 PrefValueMap overlay_; 56 PrefValueMap overlay_;
56 scoped_refptr<PersistentPrefStore> underlay_; 57 scoped_refptr<PersistentPrefStore> underlay_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(OverlayPersistentPrefStore); 59 DISALLOW_COPY_AND_ASSIGN(OverlayPersistentPrefStore);
59 }; 60 };
60 61
61 #endif // CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_ 62 #endif // CHROME_BROWSER_PREFS_OVERLAY_PERSISTENT_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698