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

Unified Diff: base/prefs/overlay_user_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/overlay_user_pref_store.h ('k') | base/prefs/overlay_user_pref_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/overlay_user_pref_store.cc
diff --git a/base/prefs/overlay_user_pref_store.cc b/base/prefs/overlay_user_pref_store.cc
index a708bb6836370757b3b6e74b9dd43b0d8a69c38c..e93dffd961a9088178d3247ad90417d4bbe11916 100644
--- a/base/prefs/overlay_user_pref_store.cc
+++ b/base/prefs/overlay_user_pref_store.cc
@@ -63,34 +63,36 @@ bool OverlayUserPrefStore::GetMutableValue(const std::string& key,
}
void OverlayUserPrefStore::SetValue(const std::string& key,
- base::Value* value) {
+ base::Value* value,
+ uint32 flags) {
if (!ShallBeStoredInOverlay(key)) {
- underlay_->SetValue(GetUnderlayKey(key), value);
+ underlay_->SetValue(GetUnderlayKey(key), value, flags);
return;
}
if (overlay_.SetValue(key, value))
- ReportValueChanged(key);
+ ReportValueChanged(key, flags);
}
void OverlayUserPrefStore::SetValueSilently(const std::string& key,
- base::Value* value) {
+ base::Value* value,
+ uint32 flags) {
if (!ShallBeStoredInOverlay(key)) {
- underlay_->SetValueSilently(GetUnderlayKey(key), value);
+ underlay_->SetValueSilently(GetUnderlayKey(key), value, flags);
return;
}
overlay_.SetValue(key, value);
}
-void OverlayUserPrefStore::RemoveValue(const std::string& key) {
+void OverlayUserPrefStore::RemoveValue(const std::string& key, uint32 flags) {
if (!ShallBeStoredInOverlay(key)) {
- underlay_->RemoveValue(GetUnderlayKey(key));
+ underlay_->RemoveValue(GetUnderlayKey(key), flags);
return;
}
if (overlay_.RemoveValue(key))
- ReportValueChanged(key);
+ ReportValueChanged(key, flags);
}
bool OverlayUserPrefStore::ReadOnly() const {
@@ -119,13 +121,14 @@ void OverlayUserPrefStore::CommitPendingWrite() {
// We do not write our content intentionally.
}
-void OverlayUserPrefStore::ReportValueChanged(const std::string& key) {
+void OverlayUserPrefStore::ReportValueChanged(const std::string& key,
+ uint32 flags) {
FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key));
}
void OverlayUserPrefStore::OnPrefValueChanged(const std::string& key) {
if (!overlay_.GetValue(GetOverlayKey(key), NULL))
- ReportValueChanged(GetOverlayKey(key));
+ ReportValueChanged(GetOverlayKey(key), DEFAULT_PREF_WRITE_FLAGS);
}
void OverlayUserPrefStore::OnInitializationCompleted(bool succeeded) {
« no previous file with comments | « base/prefs/overlay_user_pref_store.h ('k') | base/prefs/overlay_user_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698