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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: always call OnInit.. Created 9 years, 8 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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 virtual bool IsInitializationComplete() const; 30 virtual bool IsInitializationComplete() const;
31 31
32 // PersistentPrefStore overrides: 32 // PersistentPrefStore overrides:
33 virtual ReadResult GetMutableValue(const std::string& key, Value** result); 33 virtual ReadResult GetMutableValue(const std::string& key, Value** result);
34 virtual void ReportValueChanged(const std::string& key); 34 virtual void ReportValueChanged(const std::string& key);
35 virtual void SetValue(const std::string& key, Value* value); 35 virtual void SetValue(const std::string& key, Value* value);
36 virtual void SetValueSilently(const std::string& key, Value* value); 36 virtual void SetValueSilently(const std::string& key, Value* value);
37 virtual void RemoveValue(const std::string& key); 37 virtual void RemoveValue(const std::string& key);
38 virtual bool ReadOnly() const; 38 virtual bool ReadOnly() const;
39 virtual PersistentPrefStore::PrefReadError ReadPrefs(); 39 virtual PersistentPrefStore::PrefReadError ReadPrefs();
40 virtual void ReadPrefsAsync();
41 virtual void GetErrors(PrefReadError* error, bool* is_fatal);
40 virtual bool WritePrefs(); 42 virtual bool WritePrefs();
41 virtual void ScheduleWritePrefs() {} 43 virtual void ScheduleWritePrefs() {}
42 virtual void CommitPendingWrite() {} 44 virtual void CommitPendingWrite() {}
43 45
44 // Marks the store as having completed initialization. 46 // Marks the store as having completed initialization.
45 void SetInitializationCompleted(); 47 void SetInitializationCompleted();
46 48
47 // Used for tests to trigger notifications explicitly. 49 // Used for tests to trigger notifications explicitly.
48 void NotifyPrefValueChanged(const std::string& key); 50 void NotifyPrefValueChanged(const std::string& key);
49 void NotifyInitializationCompleted(); 51 void NotifyInitializationCompleted();
(...skipping 25 matching lines...) Expand all
75 77
76 // Whether initialization has been completed. 78 // Whether initialization has been completed.
77 bool init_complete_; 79 bool init_complete_;
78 80
79 ObserverList<PrefStore::Observer, true> observers_; 81 ObserverList<PrefStore::Observer, true> observers_;
80 82
81 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore); 83 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore);
82 }; 84 };
83 85
84 #endif // CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_ 86 #endif // CHROME_BROWSER_PREFS_TESTING_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698