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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 | 123 |
124 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { | 124 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { |
125 // The following actions are just best effort. | 125 // The following actions are just best effort. |
126 VLOG(1) << "Executing uninstall actions"; | 126 VLOG(1) << "Executing uninstall actions"; |
127 if (!first_run::RemoveSentinel()) | 127 if (!first_run::RemoveSentinel()) |
128 VLOG(1) << "Failed to delete sentinel file."; | 128 VLOG(1) << "Failed to delete sentinel file."; |
129 // We want to remove user level shortcuts and we only care about the ones | 129 // We want to remove user level shortcuts and we only care about the ones |
130 // created by us and not by the installer so |alternate| is false. | 130 // created by us and not by the installer so |alternate| is false. |
131 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 131 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
132 if (!ShellUtil::RemoveChromeDesktopShortcut( | 132 if (!ShellUtil::RemoveChromeShortcut( |
133 dist, ShellUtil::CURRENT_USER, ShellUtil::SHORTCUT_NO_OPTIONS)) { | 133 ShellUtil::SHORTCUT_DESKTOP, dist, ShellUtil::CURRENT_USER, NULL)) { |
134 VLOG(1) << "Failed to delete desktop shortcut."; | 134 VLOG(1) << "Failed to delete desktop shortcut."; |
135 } | 135 } |
136 // TODO(rlp): Cleanup profiles shortcuts. | 136 // TODO(rlp): Cleanup profiles shortcuts. |
137 if (!ShellUtil::RemoveChromeQuickLaunchShortcut(dist, | 137 if (!ShellUtil::RemoveChromeShortcut( |
138 ShellUtil::CURRENT_USER)) { | 138 ShellUtil::SHORTCUT_QUICK_LAUNCH, dist, ShellUtil::CURRENT_USER, |
| 139 NULL)) { |
139 VLOG(1) << "Failed to delete quick launch shortcut."; | 140 VLOG(1) << "Failed to delete quick launch shortcut."; |
140 } | 141 } |
141 } | 142 } |
142 return result; | 143 return result; |
143 } | 144 } |
144 | 145 |
145 // ChromeBrowserMainPartsWin --------------------------------------------------- | 146 // ChromeBrowserMainPartsWin --------------------------------------------------- |
146 | 147 |
147 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( | 148 ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( |
148 const content::MainFunctionParams& parameters) | 149 const content::MainFunctionParams& parameters) |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 if (resource_id) | 366 if (resource_id) |
366 return l10n_util::GetStringUTF16(resource_id); | 367 return l10n_util::GetStringUTF16(resource_id); |
367 return string16(); | 368 return string16(); |
368 } | 369 } |
369 | 370 |
370 // static | 371 // static |
371 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 372 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
372 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 373 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
373 installer::SetTranslationDelegate(&delegate); | 374 installer::SetTranslationDelegate(&delegate); |
374 } | 375 } |
OLD | NEW |