Chromium Code Reviews| 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 2d91c86851220956a149ca63dec6e532a1718323..808a4ee75b5ccb8f83f61f9a9d930c44d6bdb05a 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 |
| @@ -200,11 +200,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(); |
| @@ -230,19 +225,24 @@ 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(app_list_shortcut_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 = |
|
gab
2013/05/15 21:26:38
nit: I prefered old name "shortcut_to_pin"
calamity
2013/08/27 07:59:35
Done.
|
| + user_data_dir.Append(app_list_shortcut_name) |
| + .AddExtension(installer::kLnkExt); |
|
gab
2013/05/15 21:26:38
nit: Keep '.' on previous line
Matt Giuca
2013/05/16 00:31:05
And indent 4.
calamity
2013/08/27 07:59:35
Done.
calamity
2013/08/27 07:59:35
Done.
|
| + if (base::win::CreateOrUpdateShortcutLink(shortcut_file, |
|
gab
2013/05/15 21:26:38
nit: indent all parameters at paran or 4 spaces in
calamity
2013/08/27 07:59:35
Done.
|
| + shortcut_properties, |
| + base::win::SHORTCUT_CREATE_ALWAYS)) { |
| + base::win::TaskbarPinShortcutLink(shortcut_file.value().c_str()); |
| + } |
| } |
| } |
| @@ -1099,9 +1099,7 @@ void AppListController::EnableAppList() { |
| ShellIntegration::ShortcutLocations shortcut_locations; |
| 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(); |
| + shortcut_locations.in_applications_menu_chrome_subdir = true; |
| base::FilePath user_data_dir( |
| g_browser_process->profile_manager()->user_data_dir()); |