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

Unified Diff: chrome/browser/profiles/profile_shortcut_manager_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: Fix shell_util_unittests.cc Created 8 years, 4 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
Index: chrome/browser/profiles/profile_shortcut_manager_win.cc
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc
index 69a964649baa9e4b48de27a9454af51a342afc43..ecf708430b310c9caa89edc5cc0172370f9346d0 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -198,7 +198,8 @@ void ProfileShortcutManagerWin::CreateChromeDesktopShortcut(
avatar_image)));
}
- ShellUtil::CreateChromeDesktopShortcut(
+ ShellUtil::CreateOrUpdateChromeShortcut(
+ ShellUtil::SHORTCUT_DESKTOP,
dist,
chrome_exe.value(),
description,
@@ -206,7 +207,6 @@ void ProfileShortcutManagerWin::CreateChromeDesktopShortcut(
profile_shortcuts_[profile_path].flags,
shortcut_icon.empty() ? chrome_exe.value() : shortcut_icon.value(),
shortcut_icon.empty() ? dist->GetIconIndex() : 0,
- ShellUtil::CURRENT_USER,
ShellUtil::SHORTCUT_CREATE_ALWAYS);
}
@@ -215,8 +215,9 @@ void ProfileShortcutManagerWin::DeleteChromeDesktopShortcut(
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
string16 shortcut;
// If we can find the shortcut, delete it
- if (ShellUtil::GetChromeShortcutName(dist, false,
- profile_shortcuts_[profile_path].profile_name, &shortcut)) {
+ if (ShellUtil::GetChromeShortcutName(
+ ShellUtil::SHORTCUT_DESKTOP, dist, false,
+ profile_shortcuts_[profile_path].profile_name, &shortcut)) {
std::vector<string16> appended_names(1, shortcut);
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
@@ -226,4 +227,3 @@ void ProfileShortcutManagerWin::DeleteChromeDesktopShortcut(
profile_shortcuts_.erase(profile_path);
}
}
-

Powered by Google App Engine
This is Rietveld 408576698