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

Side by Side Diff: chrome/browser/prefs/testing_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_TESTING_PREF_STORE_H_ 5 #ifndef CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_
6 #define CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_ 6 #define CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 18 matching lines...) Expand all
29 virtual bool IsInitializationComplete() const; 29 virtual bool IsInitializationComplete() const;
30 30
31 // PersistentPrefStore overrides: 31 // PersistentPrefStore overrides:
32 virtual void SetValue(const std::string& key, Value* value); 32 virtual void SetValue(const std::string& key, Value* value);
33 virtual void SetValueSilently(const std::string& key, Value* value); 33 virtual void SetValueSilently(const std::string& key, Value* value);
34 virtual void RemoveValue(const std::string& key); 34 virtual void RemoveValue(const std::string& key);
35 virtual bool ReadOnly() const; 35 virtual bool ReadOnly() const;
36 virtual PersistentPrefStore::PrefReadError ReadPrefs(); 36 virtual PersistentPrefStore::PrefReadError ReadPrefs();
37 virtual bool WritePrefs(); 37 virtual bool WritePrefs();
38 virtual void ScheduleWritePrefs() {} 38 virtual void ScheduleWritePrefs() {}
39 virtual void CommitPendingWrite() {}
39 // TODO(battre) remove this function 40 // TODO(battre) remove this function
40 virtual void ReportValueChanged(const std::string& key); 41 virtual void ReportValueChanged(const std::string& key);
41 42
42 // Marks the store as having completed initialization. 43 // Marks the store as having completed initialization.
43 void SetInitializationCompleted(); 44 void SetInitializationCompleted();
44 45
45 // Used for tests to trigger notifications explicitly. 46 // Used for tests to trigger notifications explicitly.
46 void NotifyPrefValueChanged(const std::string& key); 47 void NotifyPrefValueChanged(const std::string& key);
47 void NotifyInitializationCompleted(); 48 void NotifyInitializationCompleted();
48 49
(...skipping 24 matching lines...) Expand all
73 74
74 // Whether initialization has been completed. 75 // Whether initialization has been completed.
75 bool init_complete_; 76 bool init_complete_;
76 77
77 ObserverList<PrefStore::Observer, true> observers_; 78 ObserverList<PrefStore::Observer, true> observers_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore); 80 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore);
80 }; 81 };
81 82
82 #endif // CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_ 83 #endif // CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698