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

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

Issue 10055003: Keep emtpy List/Dictionary pref value with non-empty default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 2012 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_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 <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 virtual bool IsInitializationComplete() const OVERRIDE; 31 virtual bool IsInitializationComplete() const OVERRIDE;
32 32
33 // PersistentPrefStore overrides: 33 // PersistentPrefStore overrides:
34 virtual ReadResult GetMutableValue(const std::string& key, 34 virtual ReadResult GetMutableValue(const std::string& key,
35 base::Value** result) OVERRIDE; 35 base::Value** result) OVERRIDE;
36 virtual void ReportValueChanged(const std::string& key) OVERRIDE; 36 virtual void ReportValueChanged(const std::string& key) OVERRIDE;
37 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; 37 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE;
38 virtual void SetValueSilently(const std::string& key, 38 virtual void SetValueSilently(const std::string& key,
39 base::Value* value) OVERRIDE; 39 base::Value* value) OVERRIDE;
40 virtual void RemoveValue(const std::string& key) OVERRIDE; 40 virtual void RemoveValue(const std::string& key) OVERRIDE;
41 virtual void MarkNeedsEmptyValue(const std::string& key) OVERRIDE;
41 virtual bool ReadOnly() const OVERRIDE; 42 virtual bool ReadOnly() const OVERRIDE;
42 virtual PrefReadError GetReadError() const OVERRIDE; 43 virtual PrefReadError GetReadError() const OVERRIDE;
43 virtual PersistentPrefStore::PrefReadError ReadPrefs() OVERRIDE; 44 virtual PersistentPrefStore::PrefReadError ReadPrefs() OVERRIDE;
44 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) OVERRIDE; 45 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) OVERRIDE;
45 virtual void CommitPendingWrite() OVERRIDE {} 46 virtual void CommitPendingWrite() OVERRIDE {}
46 47
47 // Marks the store as having completed initialization. 48 // Marks the store as having completed initialization.
48 void SetInitializationCompleted(); 49 void SetInitializationCompleted();
49 50
50 // Used for tests to trigger notifications explicitly. 51 // Used for tests to trigger notifications explicitly.
(...skipping 25 matching lines...) Expand all
76 77
77 // Whether initialization has been completed. 78 // Whether initialization has been completed.
78 bool init_complete_; 79 bool init_complete_;
79 80
80 ObserverList<PrefStore::Observer, true> observers_; 81 ObserverList<PrefStore::Observer, true> observers_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore); 83 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore);
83 }; 84 };
84 85
85 #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