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

Unified Diff: chrome/browser/prefs/pref_model_associator.cc

Issue 8135001: Fixed behavior of the bookmark bar visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 years, 2 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
Index: chrome/browser/prefs/pref_model_associator.cc
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index 17fa13070c63ff3ab113233606f55fc0e58cadcf..8cf0a39a6535af2c9424f71b4ebe277f73f198b2 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -82,8 +82,6 @@ void PrefModelAssociator::InitPrefAndAssociate(
pref_service_->Set(pref_name.c_str(), *new_value);
}
- SendUpdateNotificationsIfNecessary(pref_name);
-
// If the merge resulted in an updated value, inform the syncer.
if (!value->Equals(new_value.get())) {
SyncData sync_data;
@@ -273,18 +271,6 @@ Value* PrefModelAssociator::MergeDictionaryValues(
return result;
}
-void PrefModelAssociator::SendUpdateNotificationsIfNecessary(
- const std::string& pref_name) {
- // The bookmark bar visibility preference requires a special
- // notification to update the UI.
- if (0 == pref_name.compare(prefs::kShowBookmarkBar)) {
- NotificationService::current()->Notify(
- chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
- Source<PrefModelAssociator>(this),
- NotificationService::NoDetails());
- }
-}
-
// Note: This will build a model of all preferences registered as syncable
// with user controlled data. We do not track any information for preferences
// not registered locally as syncable and do not inform the syncer of
@@ -365,8 +351,6 @@ SyncError PrefModelAssociator::ProcessSyncChanges(
if (iter->change_type() == SyncChange::ACTION_ADD) {
synced_preferences_.insert(name);
}
-
- SendUpdateNotificationsIfNecessary(name);
}
return SyncError();
}

Powered by Google App Engine
This is Rietveld 408576698