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

Unified Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 2640023005: Load shelf preferences from ChromeLauncherController::AttachProfile. (Closed)
Patch Set: Cleanup; Avoid no-op DictionaryPrefUpdate notifications. Created 3 years, 11 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 | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_launcher_prefs.cc
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index 440f652a259c20d0f7200b68f58d2dd081fdc082..23ccb8e736b39bf36926f6934e356f10964016e5 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -114,6 +114,10 @@ void SetPerDisplayPref(PrefService* prefs,
if (display_id < 0)
return;
+ // Avoid DictionaryPrefUpdate's notifications for unchanged prefs.
+ if (GetPerDisplayPref(prefs, display_id, pref_key, pref_key) == value)
+ return;
+
DictionaryPrefUpdate update(prefs, prefs::kShelfPreferences);
base::DictionaryValue* shelf_prefs = update.Get();
base::DictionaryValue* pref_dictionary = nullptr;
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698