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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 1405993006: Revert of Change shortcut install location to non-subdir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 246
247 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { 247 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) {
248 // The following actions are just best effort. 248 // The following actions are just best effort.
249 // TODO(gab): Look into removing this code which is now redundant with the 249 // TODO(gab): Look into removing this code which is now redundant with the
250 // work done by setup.exe on uninstall. 250 // work done by setup.exe on uninstall.
251 VLOG(1) << "Executing uninstall actions"; 251 VLOG(1) << "Executing uninstall actions";
252 base::FilePath chrome_exe; 252 base::FilePath chrome_exe;
253 if (PathService::Get(base::FILE_EXE, &chrome_exe)) { 253 if (PathService::Get(base::FILE_EXE, &chrome_exe)) {
254 ShellUtil::ShortcutLocation user_shortcut_locations[] = { 254 ShellUtil::ShortcutLocation user_shortcut_locations[] = {
255 ShellUtil::SHORTCUT_LOCATION_DESKTOP, 255 ShellUtil::SHORTCUT_LOCATION_DESKTOP,
256 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, 256 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH,
257 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, 257 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
258 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, 258 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR,
259 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR,
260 }; 259 };
261 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 260 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
262 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { 261 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) {
263 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, 262 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist,
264 ShellUtil::CURRENT_USER, chrome_exe)) { 263 ShellUtil::CURRENT_USER, chrome_exe)) {
265 VLOG(1) << "Failed to delete shortcut at location " 264 VLOG(1) << "Failed to delete shortcut at location "
266 << user_shortcut_locations[i]; 265 << user_shortcut_locations[i];
267 } 266 }
268 } 267 }
269 } else { 268 } else {
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 if (resource_id) 585 if (resource_id)
587 return l10n_util::GetStringUTF16(resource_id); 586 return l10n_util::GetStringUTF16(resource_id);
588 return base::string16(); 587 return base::string16();
589 } 588 }
590 589
591 // static 590 // static
592 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 591 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
593 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 592 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
594 installer::SetTranslationDelegate(&delegate); 593 installer::SetTranslationDelegate(&delegate);
595 } 594 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698