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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { | 133 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { |
134 // The following actions are just best effort. | 134 // The following actions are just best effort. |
135 VLOG(1) << "Executing uninstall actions"; | 135 VLOG(1) << "Executing uninstall actions"; |
136 if (!first_run::RemoveSentinel()) | 136 if (!first_run::RemoveSentinel()) |
137 VLOG(1) << "Failed to delete sentinel file."; | 137 VLOG(1) << "Failed to delete sentinel file."; |
138 base::FilePath chrome_exe; | 138 base::FilePath chrome_exe; |
139 if (PathService::Get(base::FILE_EXE, &chrome_exe)) { | 139 if (PathService::Get(base::FILE_EXE, &chrome_exe)) { |
140 ShellUtil::ShortcutLocation user_shortcut_locations[] = { | 140 ShellUtil::ShortcutLocation user_shortcut_locations[] = { |
141 ShellUtil::SHORTCUT_LOCATION_DESKTOP, | 141 ShellUtil::SHORTCUT_LOCATION_DESKTOP, |
142 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, | 142 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, |
143 ShellUtil::SHORTCUT_LOCATION_START_MENU, | 143 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, |
144 }; | 144 }; |
145 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 145 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
146 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { | 146 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { |
147 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, | 147 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, |
148 ShellUtil::CURRENT_USER, chrome_exe)) { | 148 ShellUtil::CURRENT_USER, chrome_exe)) { |
149 VLOG(1) << "Failed to delete shortcut at location " | 149 VLOG(1) << "Failed to delete shortcut at location " |
150 << user_shortcut_locations[i]; | 150 << user_shortcut_locations[i]; |
151 } | 151 } |
152 } | 152 } |
153 } else { | 153 } else { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 if (resource_id) | 402 if (resource_id) |
403 return l10n_util::GetStringUTF16(resource_id); | 403 return l10n_util::GetStringUTF16(resource_id); |
404 return string16(); | 404 return string16(); |
405 } | 405 } |
406 | 406 |
407 // static | 407 // static |
408 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 408 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
409 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 409 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
410 installer::SetTranslationDelegate(&delegate); | 410 installer::SetTranslationDelegate(&delegate); |
411 } | 411 } |
OLD | NEW |