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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { | 117 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { |
118 // The following actions are just best effort. | 118 // The following actions are just best effort. |
119 VLOG(1) << "Executing uninstall actions"; | 119 VLOG(1) << "Executing uninstall actions"; |
120 if (!first_run::RemoveSentinel()) | 120 if (!first_run::RemoveSentinel()) |
121 VLOG(1) << "Failed to delete sentinel file."; | 121 VLOG(1) << "Failed to delete sentinel file."; |
122 base::FilePath chrome_exe; | 122 base::FilePath chrome_exe; |
123 if (PathService::Get(base::FILE_EXE, &chrome_exe)) { | 123 if (PathService::Get(base::FILE_EXE, &chrome_exe)) { |
124 ShellUtil::ShortcutLocation user_shortcut_locations[] = { | 124 ShellUtil::ShortcutLocation user_shortcut_locations[] = { |
125 ShellUtil::SHORTCUT_LOCATION_DESKTOP, | 125 ShellUtil::SHORTCUT_LOCATION_DESKTOP, |
126 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, | 126 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, |
127 ShellUtil::SHORTCUT_LOCATION_START_MENU, | 127 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, |
128 }; | 128 }; |
129 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 129 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
130 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { | 130 for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) { |
131 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, | 131 if (!ShellUtil::RemoveShortcuts(user_shortcut_locations[i], dist, |
132 ShellUtil::CURRENT_USER, chrome_exe)) { | 132 ShellUtil::CURRENT_USER, chrome_exe)) { |
133 VLOG(1) << "Failed to delete shortcut at location " | 133 VLOG(1) << "Failed to delete shortcut at location " |
134 << user_shortcut_locations[i]; | 134 << user_shortcut_locations[i]; |
135 } | 135 } |
136 } | 136 } |
137 } else { | 137 } else { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 if (resource_id) | 377 if (resource_id) |
378 return l10n_util::GetStringUTF16(resource_id); | 378 return l10n_util::GetStringUTF16(resource_id); |
379 return string16(); | 379 return string16(); |
380 } | 380 } |
381 | 381 |
382 // static | 382 // static |
383 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 383 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
384 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 384 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
385 installer::SetTranslationDelegate(&delegate); | 385 installer::SetTranslationDelegate(&delegate); |
386 } | 386 } |
OLD | NEW |