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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, |
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::RemoveShortcut(user_shortcut_locations[i], dist, | 147 if (!ShellUtil::RemoveShortcut(user_shortcut_locations[i], dist, |
148 chrome_exe, ShellUtil::CURRENT_USER, | 148 ShellUtil::CURRENT_USER, chrome_exe)) { |
149 NULL)) { | |
150 VLOG(1) << "Failed to delete shortcut at location " | 149 VLOG(1) << "Failed to delete shortcut at location " |
151 << user_shortcut_locations[i]; | 150 << user_shortcut_locations[i]; |
152 } | 151 } |
153 } | 152 } |
154 } else { | 153 } else { |
155 NOTREACHED(); | 154 NOTREACHED(); |
156 } | 155 } |
157 } | 156 } |
158 return result; | 157 return result; |
159 } | 158 } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 if (resource_id) | 402 if (resource_id) |
404 return l10n_util::GetStringUTF16(resource_id); | 403 return l10n_util::GetStringUTF16(resource_id); |
405 return string16(); | 404 return string16(); |
406 } | 405 } |
407 | 406 |
408 // static | 407 // static |
409 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 408 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
410 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 409 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
411 installer::SetTranslationDelegate(&delegate); | 410 installer::SetTranslationDelegate(&delegate); |
412 } | 411 } |
OLD | NEW |