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

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

Issue 13864015: Move app launcher and chrome apps shortcut strings into the installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_app_id_fix
Patch Set: rework Created 7 years, 8 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 069ba1d0b415270efab79b0c656038bd9436cf82..51b0608abee24dce5397ea25ce9fb315cb9c9878 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
@@ -166,11 +166,6 @@ void CreateAppListShortcuts(
bool pin_to_taskbar = creation_locations.in_quick_launch_bar &&
(base::win::GetVersion() >= base::win::VERSION_WIN7);
- // Create a shortcut in the |user_data_dir| for taskbar pinning.
- if (pin_to_taskbar)
- shortcut_paths.push_back(user_data_dir);
- bool success = true;
-
base::FilePath chrome_exe;
if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
NOTREACHED();
@@ -197,18 +192,21 @@ void CreateAppListShortcuts(
if (!file_util::PathExists(shortcut_file.DirName()) &&
!file_util::CreateDirectory(shortcut_file.DirName())) {
NOTREACHED();
- return;
+ continue;
}
- success = success && base::win::CreateOrUpdateShortcutLink(
- shortcut_file, shortcut_properties,
- base::win::SHORTCUT_CREATE_ALWAYS);
+ base::win::CreateOrUpdateShortcutLink(shortcut_file,
+ shortcut_properties,
+ base::win::SHORTCUT_CREATE_ALWAYS);
}
- if (success && pin_to_taskbar) {
- base::FilePath shortcut_to_pin = user_data_dir.Append(file_name).
- AddExtension(installer::kLnkExt);
- success = base::win::TaskbarPinShortcutLink(
- shortcut_to_pin.value().c_str()) && success;
+ // Create a shortcut in the |user_data_dir| for taskbar pinning.
+ if (pin_to_taskbar) {
+ base::FilePath shortcut_file = user_data_dir.Append(file_name).
+ AddExtension(installer::kLnkExt);
+ if (base::win::CreateOrUpdateShortcutLink(shortcut_file,
+ shortcut_properties, base::win::SHORTCUT_CREATE_ALWAYS)) {
gab 2013/04/30 15:00:24 This indent is still incorrect, the rule is to eit
+ base::win::TaskbarPinShortcutLink(shortcut_file.value().c_str());
+ }
}
}
@@ -1006,8 +1004,6 @@ void AppListController::EnableAppList() {
shortcut_locations.on_desktop = true;
shortcut_locations.in_quick_launch_bar = true;
shortcut_locations.in_applications_menu = true;
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- shortcut_locations.applications_menu_subdir = dist->GetAppShortCutName();
base::FilePath user_data_dir(
g_browser_process->profile_manager()->user_data_dir());

Powered by Google App Engine
This is Rietveld 408576698