| 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_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 Loading... |
| 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 } |
| OLD | NEW |