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

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: DCHECK_EQ instead of DCHECK 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
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2028f8d010bf55d79609d12ea6ae2cc81e1010c6..b61e51177d540937a71fcb097fe334eed54098ad 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();
}
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698