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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
index 8c6d199c32615b45d6636cc5a9116b570a41866e..725dd59a764f45e1d96693e3af31410590f39e24 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
-#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -303,7 +303,7 @@ ChromeLauncherControllerPerBrowser::~ChromeLauncherControllerPerBrowser() {
if (app_sync_ui_state_)
app_sync_ui_state_->RemoveObserver(this);
- profile_->GetPrefs()->RemoveObserver(this);
+ PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this);
}
void ChromeLauncherControllerPerBrowser::Init() {
@@ -313,7 +313,7 @@ void ChromeLauncherControllerPerBrowser::Init() {
if (ash::Shell::HasInstance()) {
SetShelfAutoHideBehaviorFromPrefs();
SetShelfAlignmentFromPrefs();
- PrefServiceSyncable* prefs = profile_->GetPrefs();
+ PrefServiceSyncable* prefs = PrefServiceSyncable::FromProfile(profile_);
if (!prefs->FindPreference(prefs::kShelfAlignmentLocal)->HasUserSetting() ||
!prefs->FindPreference(prefs::kShelfAutoHideBehaviorLocal)->
HasUserSetting()) {
@@ -973,10 +973,11 @@ void ChromeLauncherControllerPerBrowser::OnShelfAlignmentChanged(
}
void ChromeLauncherControllerPerBrowser::OnIsSyncingChanged() {
- MaybePropagatePrefToLocal(profile_->GetPrefs(),
+ PrefServiceSyncable* prefs = PrefServiceSyncable::FromProfile(profile_);
+ MaybePropagatePrefToLocal(prefs,
prefs::kShelfAlignmentLocal,
prefs::kShelfAlignment);
- MaybePropagatePrefToLocal(profile_->GetPrefs(),
+ MaybePropagatePrefToLocal(prefs,
prefs::kShelfAutoHideBehaviorLocal,
prefs::kShelfAutoHideBehavior);
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.cc ('k') | chrome/browser/ui/browser_instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698