Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Unified Diff: chrome/browser/first_run/first_run_win.cc

Issue 10836247: Refactor ShellUtil shortcut code -- single multi-purpose methods as opposed to many slighlty diffe… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respect microsoft's definition of correct C++ Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/profiles/profile_shortcut_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_win.cc
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index fbd92bc10deb3388779a0d1f4a4d685a8d06236d..e4037f6560c324d6738f4b3d759124e631a85106 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -111,16 +111,12 @@ bool CreateChromeDesktopShortcut() {
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
if (!dist || !dist->CanCreateDesktopShortcuts())
return false;
- return ShellUtil::CreateChromeDesktopShortcut(
- dist,
- chrome_exe.value(),
- dist->GetAppDescription(),
- L"",
- L"",
- chrome_exe.value(),
- dist->GetIconIndex(),
- ShellUtil::CURRENT_USER,
- ShellUtil::SHORTCUT_CREATE_ALWAYS);
+ ShellUtil::ChromeShortcutProperties shortcut_properties(
+ ShellUtil::CURRENT_USER);
+ shortcut_properties.set_chrome_exe(chrome_exe);
+ return ShellUtil::CreateOrUpdateChromeShortcut(
+ ShellUtil::SHORTCUT_DESKTOP, dist, shortcut_properties,
+ ShellUtil::SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL);
}
// Creates the quick launch shortcut to chrome for the current user. Returns
@@ -130,11 +126,12 @@ bool CreateChromeQuickLaunchShortcut() {
if (!PathService::Get(base::FILE_EXE, &chrome_exe))
return false;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- return ShellUtil::CreateChromeQuickLaunchShortcut(
- dist,
- chrome_exe.value(),
- ShellUtil::CURRENT_USER, // create only for current user.
- ShellUtil::SHORTCUT_CREATE_ALWAYS);
+ ShellUtil::ChromeShortcutProperties shortcut_properties(
+ ShellUtil::CURRENT_USER);
+ shortcut_properties.set_chrome_exe(chrome_exe);
+ return ShellUtil::CreateOrUpdateChromeShortcut(
+ ShellUtil::SHORTCUT_QUICK_LAUNCH, dist, shortcut_properties,
+ ShellUtil::SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL);
}
void PlatformSetup(Profile* profile) {
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/profiles/profile_shortcut_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698