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

Unified Diff: base/prefs/testing_pref_store.cc

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/prefs/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/testing_pref_store.cc
diff --git a/base/prefs/testing_pref_store.cc b/base/prefs/testing_pref_store.cc
index f20824e173320139bbd22356785cdaa7ce3952d9..35c9763eec5b15c3a27ef375750dd45adbd6a3e3 100644
--- a/base/prefs/testing_pref_store.cc
+++ b/base/prefs/testing_pref_store.cc
@@ -42,7 +42,9 @@ bool TestingPrefStore::IsInitializationComplete() const {
return init_complete_;
}
-void TestingPrefStore::SetValue(const std::string& key, base::Value* value) {
+void TestingPrefStore::SetValue(const std::string& key,
+ base::Value* value,
+ uint32 flags) {
if (prefs_.SetValue(key, value)) {
committed_ = false;
NotifyPrefValueChanged(key);
@@ -50,12 +52,13 @@ void TestingPrefStore::SetValue(const std::string& key, base::Value* value) {
}
void TestingPrefStore::SetValueSilently(const std::string& key,
- base::Value* value) {
+ base::Value* value,
+ uint32 flags) {
if (prefs_.SetValue(key, value))
committed_ = false;
}
-void TestingPrefStore::RemoveValue(const std::string& key) {
+void TestingPrefStore::RemoveValue(const std::string& key, uint32 flags) {
if (prefs_.RemoveValue(key)) {
committed_ = false;
NotifyPrefValueChanged(key);
@@ -103,21 +106,22 @@ void TestingPrefStore::NotifyInitializationCompleted() {
Observer, observers_, OnInitializationCompleted(read_success_));
}
-void TestingPrefStore::ReportValueChanged(const std::string& key) {
+void TestingPrefStore::ReportValueChanged(const std::string& key,
+ uint32 flags) {
FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
}
void TestingPrefStore::SetString(const std::string& key,
const std::string& value) {
- SetValue(key, new base::StringValue(value));
+ SetValue(key, new base::StringValue(value), DEFAULT_PREF_WRITE_FLAGS);
}
void TestingPrefStore::SetInteger(const std::string& key, int value) {
- SetValue(key, new base::FundamentalValue(value));
+ SetValue(key, new base::FundamentalValue(value), DEFAULT_PREF_WRITE_FLAGS);
}
void TestingPrefStore::SetBoolean(const std::string& key, bool value) {
- SetValue(key, new base::FundamentalValue(value));
+ SetValue(key, new base::FundamentalValue(value), DEFAULT_PREF_WRITE_FLAGS);
}
bool TestingPrefStore::GetString(const std::string& key,
« no previous file with comments | « base/prefs/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698