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

Side by Side Diff: components/prefs/testing_pref_store.h

Issue 1907043002: Convert //components/prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes Created 4 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
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 COMPONENTS_PREFS_TESTING_PREF_STORE_H_ 5 #ifndef COMPONENTS_PREFS_TESTING_PREF_STORE_H_
6 #define COMPONENTS_PREFS_TESTING_PREF_STORE_H_ 6 #define COMPONENTS_PREFS_TESTING_PREF_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 16 matching lines...) Expand all
27 const base::Value** result) const override; 27 const base::Value** result) const override;
28 void AddObserver(PrefStore::Observer* observer) override; 28 void AddObserver(PrefStore::Observer* observer) override;
29 void RemoveObserver(PrefStore::Observer* observer) override; 29 void RemoveObserver(PrefStore::Observer* observer) override;
30 bool HasObservers() const override; 30 bool HasObservers() const override;
31 bool IsInitializationComplete() const override; 31 bool IsInitializationComplete() const override;
32 32
33 // PersistentPrefStore overrides: 33 // PersistentPrefStore overrides:
34 bool GetMutableValue(const std::string& key, base::Value** result) override; 34 bool GetMutableValue(const std::string& key, base::Value** result) override;
35 void ReportValueChanged(const std::string& key, uint32_t flags) override; 35 void ReportValueChanged(const std::string& key, uint32_t flags) override;
36 void SetValue(const std::string& key, 36 void SetValue(const std::string& key,
37 scoped_ptr<base::Value> value, 37 std::unique_ptr<base::Value> value,
38 uint32_t flags) override; 38 uint32_t flags) override;
39 void SetValueSilently(const std::string& key, 39 void SetValueSilently(const std::string& key,
40 scoped_ptr<base::Value> value, 40 std::unique_ptr<base::Value> value,
41 uint32_t flags) override; 41 uint32_t flags) override;
42 void RemoveValue(const std::string& key, uint32_t flags) override; 42 void RemoveValue(const std::string& key, uint32_t flags) override;
43 bool ReadOnly() const override; 43 bool ReadOnly() const override;
44 PrefReadError GetReadError() const override; 44 PrefReadError GetReadError() const override;
45 PersistentPrefStore::PrefReadError ReadPrefs() override; 45 PersistentPrefStore::PrefReadError ReadPrefs() override;
46 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; 46 void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
47 void CommitPendingWrite() override; 47 void CommitPendingWrite() override;
48 void SchedulePendingLossyWrites() override; 48 void SchedulePendingLossyWrites() override;
49 49
50 // Marks the store as having completed initialization. 50 // Marks the store as having completed initialization.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Whether there is a pending call to ReadPrefsAsync. 100 // Whether there is a pending call to ReadPrefsAsync.
101 bool pending_async_read_; 101 bool pending_async_read_;
102 102
103 // Whether initialization has been completed. 103 // Whether initialization has been completed.
104 bool init_complete_; 104 bool init_complete_;
105 105
106 // Whether the store contents have been committed to disk since the last 106 // Whether the store contents have been committed to disk since the last
107 // mutation. 107 // mutation.
108 bool committed_; 108 bool committed_;
109 109
110 scoped_ptr<ReadErrorDelegate> error_delegate_; 110 std::unique_ptr<ReadErrorDelegate> error_delegate_;
111 base::ObserverList<PrefStore::Observer, true> observers_; 111 base::ObserverList<PrefStore::Observer, true> observers_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore); 113 DISALLOW_COPY_AND_ASSIGN(TestingPrefStore);
114 }; 114 };
115 115
116 #endif // COMPONENTS_PREFS_TESTING_PREF_STORE_H_ 116 #endif // COMPONENTS_PREFS_TESTING_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698