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

Unified Diff: chrome/installer/setup/install.cc

Issue 8785006: Badge Windows profile shortcuts with multi-user avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: addressed grt@s driveby comments and installer_util compile issues Created 9 years 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/installer/setup/install.cc
===================================================================
--- chrome/installer/setup/install.cc (revision 112717)
+++ chrome/installer/setup/install.cc (working copy)
@@ -131,12 +131,14 @@
VLOG(1) << "Creating shortcut to " << chrome_exe.value() << " at "
<< chrome_link.value();
ret = ShellUtil::UpdateChromeShortcut(browser_dist, chrome_exe.value(),
- chrome_link.value(), L"", product_desc, true);
+ chrome_link.value(), L"", product_desc, chrome_exe.value(),
+ browser_dist->GetIconIndex(), true);
} else if (file_util::PathExists(chrome_link)) {
VLOG(1) << "Updating shortcut at " << chrome_link.value()
<< " to point to " << chrome_exe.value();
ret = ShellUtil::UpdateChromeShortcut(browser_dist, chrome_exe.value(),
- chrome_link.value(), L"", product_desc, false);
+ chrome_link.value(), L"", product_desc, chrome_exe.value(),
+ browser_dist->GetIconIndex(), false);
} else {
VLOG(1)
<< "not first or repaired install, link file doesn't exist. status: "
@@ -179,26 +181,21 @@
// is specified we want to create them, otherwise we update them only if
// they exist.
if (ret) {
+ ShellUtil::ShellChange desktop_level = ShellUtil::CURRENT_USER;
+ int quick_launch_levels = ShellUtil::CURRENT_USER;
if (installer_state.system_install()) {
- ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(),
- chrome_exe.value(), product_desc, L"", L"", ShellUtil::SYSTEM_LEVEL,
- alt_shortcut, create_all_shortcut);
- if (ret) {
- ret = ShellUtil::CreateChromeQuickLaunchShortcut(
- product.distribution(), chrome_exe.value(),
- ShellUtil::CURRENT_USER | ShellUtil::SYSTEM_LEVEL,
- create_all_shortcut);
- }
- } else {
- ret = ShellUtil::CreateChromeDesktopShortcut(product.distribution(),
- chrome_exe.value(), product_desc, L"", L"", ShellUtil::CURRENT_USER,
- alt_shortcut, create_all_shortcut);
- if (ret) {
- ret = ShellUtil::CreateChromeQuickLaunchShortcut(
- product.distribution(), chrome_exe.value(), ShellUtil::CURRENT_USER,
- create_all_shortcut);
- }
+ desktop_level = ShellUtil::SYSTEM_LEVEL;
+ quick_launch_levels |= ShellUtil::SYSTEM_LEVEL;
}
+ ret = ShellUtil::CreateChromeDesktopShortcut(browser_dist,
+ chrome_exe.value(), product_desc, L"", L"", chrome_exe.value(),
+ browser_dist->GetIconIndex(), desktop_level, alt_shortcut,
+ create_all_shortcut);
+ if (ret) {
+ ret = ShellUtil::CreateChromeQuickLaunchShortcut(
+ browser_dist, chrome_exe.value(), quick_launch_levels,
+ create_all_shortcut);
+ }
}
return ret;

Powered by Google App Engine
This is Rietveld 408576698