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 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()); |