OLD | NEW |
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 Loading... |
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_CHROME_DIR, | 257 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT, |
258 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR, | 258 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, |
| 259 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR, |
259 }; | 260 }; |
260 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 261 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
261 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { | 262 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { |
262 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, | 263 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, |
263 ShellUtil::CURRENT_USER, chrome_exe)) { | 264 ShellUtil::CURRENT_USER, chrome_exe)) { |
264 VLOG(1) << "Failed to delete shortcut at location " | 265 VLOG(1) << "Failed to delete shortcut at location " |
265 << user_shortcut_locations[i]; | 266 << user_shortcut_locations[i]; |
266 } | 267 } |
267 } | 268 } |
268 } else { | 269 } else { |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 if (resource_id) | 586 if (resource_id) |
586 return l10n_util::GetStringUTF16(resource_id); | 587 return l10n_util::GetStringUTF16(resource_id); |
587 return base::string16(); | 588 return base::string16(); |
588 } | 589 } |
589 | 590 |
590 // static | 591 // static |
591 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 592 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
592 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 593 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
593 installer::SetTranslationDelegate(&delegate); | 594 installer::SetTranslationDelegate(&delegate); |
594 } | 595 } |
OLD | NEW |