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

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

Issue 2613303003: Use the correct profile for shelf prefs. (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 9c9392d4d6e5684dbae20cc270ace03cf1cbaa0f..bf25719d7c3e40db5de8c4296cc4a6103e427b7e 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -6,7 +6,7 @@
#include "base/memory/ptr_util.h"
#include "chrome/browser/extensions/extension_app_icon_loader.h"
-#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
@@ -80,7 +80,7 @@ void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() {
return;
// The pref helper functions return default values for invalid display ids.
- PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs();
+ PrefService* prefs = profile_->GetPrefs();
for (const auto& display : display::Screen::GetScreen()->GetAllDisplays()) {
shelf_controller_->SetAutoHideBehavior(
ash::launcher::GetShelfAutoHideBehaviorPref(prefs, display.id()),
@@ -93,7 +93,7 @@ void ChromeLauncherController::SetShelfAlignmentFromPrefs() {
return;
// The pref helper functions return default values for invalid display ids.
- PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs();
+ PrefService* prefs = profile_->GetPrefs();
for (const auto& display : display::Screen::GetScreen()->GetAllDisplays()) {
shelf_controller_->SetAlignment(
ash::launcher::GetShelfAlignmentPref(prefs, display.id()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698