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

Unified Diff: chrome/browser/ui/views/app_list/app_list_controller_win.cc

Issue 18421007: [win] Set the profile path when enabling the app launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, and fix a few things Created 7 years, 5 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/views/app_list/app_list_controller_win.cc
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index d459a0167a37f4bb6d7449aa87d6532414b0312d..c17ef4674ba528acaa35068fc73b9ef421bf0a46 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -301,7 +301,6 @@ class AppListController : public AppListServiceImpl {
void AppListClosing();
void AppListActivationChanged(bool active);
void ShowAppListDuringModeSwitch(Profile* requested_profile);
- void DisableAppList();
app_list::AppListView* GetView() { return current_view_; }
@@ -310,11 +309,11 @@ class AppListController : public AppListServiceImpl {
virtual void ShowAppList(Profile* requested_profile) OVERRIDE;
virtual void DismissAppList() OVERRIDE;
virtual bool IsAppListVisible() const OVERRIDE;
- virtual void EnableAppList() OVERRIDE;
virtual gfx::NativeWindow GetAppListWindow() OVERRIDE;
virtual AppListControllerDelegate* CreateControllerDelegate() OVERRIDE;
// AppListServiceImpl overrides:
+ virtual void CreateShortcut() OVERRIDE;
virtual void OnSigninStatusChanged() OVERRIDE;
private:
@@ -527,7 +526,7 @@ void AppListController::ShowAppList(Profile* requested_profile) {
return;
}
- SaveProfilePathToLocalState(requested_profile->GetPath());
+ SetProfilePath(requested_profile->GetPath());
DismissAppList();
PopulateViewFromProfile(requested_profile);
@@ -883,7 +882,7 @@ void AppListController::Init(Profile* initial_profile) {
chrome_launcher_support::UninstallLegacyAppLauncher(
chrome_launcher_support::USER_LEVEL_INSTALLATION);
}
- EnableAppList();
+ EnableAppList(initial_profile);
}
#endif
@@ -893,25 +892,18 @@ void AppListController::Init(Profile* initial_profile) {
ScheduleWarmup();
MigrateAppLauncherEnabledPref();
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppList))
- EnableAppList();
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableAppList))
- DisableAppList();
+ SharedDesktopInit(initial_profile);
}
bool AppListController::IsAppListVisible() const {
return current_view_ && current_view_->GetWidget()->IsVisible();
}
-void AppListController::EnableAppList() {
+void AppListController::CreateShortcut() {
// Check if the app launcher shortcuts have ever been created before.
// Shortcuts should only be created once. If the user unpins the taskbar
// shortcut, they can restore it by pinning the start menu or desktop
// shortcut.
- PrefService* local_state = g_browser_process->local_state();
- local_state->SetBoolean(apps::prefs::kAppLauncherHasBeenEnabled, true);
ShellIntegration::ShortcutLocations shortcut_locations;
shortcut_locations.on_desktop = true;
shortcut_locations.in_quick_launch_bar = true;
@@ -928,11 +920,6 @@ void AppListController::EnableAppList() {
user_data_dir, GetAppModelId(), shortcut_locations));
}
-void AppListController::DisableAppList() {
- PrefService* local_state = g_browser_process->local_state();
- local_state->SetBoolean(apps::prefs::kAppLauncherHasBeenEnabled, false);
-}
-
void AppListController::ScheduleWarmup() {
// Post a task to create the app list. This is posted to not impact startup
// time.

Powered by Google App Engine
This is Rietveld 408576698