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

Unified Diff: chrome/installer/util/shell_util.cc

Issue 8785006: Badge Windows profile shortcuts with multi-user avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merged to TOT. Fixed cpu's nits. 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
« no previous file with comments | « chrome/installer/util/shell_util.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
===================================================================
--- chrome/installer/util/shell_util.cc (revision 113013)
+++ chrome/installer/util/shell_util.cc (working copy)
@@ -547,6 +547,8 @@
const std::wstring& description,
const std::wstring& appended_name,
const std::wstring& arguments,
+ const std::wstring& icon_path,
+ int icon_index,
ShellChange shell_change,
bool alternate,
bool create_new) {
@@ -573,6 +575,8 @@
shortcut.value(),
arguments,
description,
+ icon_path,
+ icon_index,
create_new);
}
}
@@ -585,6 +589,8 @@
shortcut.value(),
arguments,
description,
+ icon_path,
+ icon_index,
create_new);
}
} else {
@@ -608,7 +614,9 @@
if (ShellUtil::GetQuickLaunchPath(false, &user_ql_path)) {
file_util::AppendToPath(&user_ql_path, shortcut_name);
ret = ShellUtil::UpdateChromeShortcut(dist, chrome_exe, user_ql_path,
- L"", L"", create_new);
+ L"", L"", chrome_exe,
+ dist->GetIconIndex(),
+ create_new);
} else {
ret = false;
}
@@ -621,7 +629,9 @@
if (ShellUtil::GetQuickLaunchPath(true, &default_ql_path)) {
file_util::AppendToPath(&default_ql_path, shortcut_name);
ret = ShellUtil::UpdateChromeShortcut(dist, chrome_exe, default_ql_path,
- L"", L"", create_new) && ret;
+ L"", L"", chrome_exe,
+ dist->GetIconIndex(),
+ create_new) && ret;
} else {
ret = false;
}
@@ -1052,15 +1062,18 @@
const std::wstring& shortcut,
const std::wstring& arguments,
const std::wstring& description,
+ const std::wstring& icon_path,
+ int icon_index,
bool create_new) {
std::wstring chrome_path = FilePath(chrome_exe).DirName().value();
FilePath prefs_path(chrome_path);
prefs_path = prefs_path.AppendASCII(installer::kDefaultMasterPrefs);
installer::MasterPreferences prefs(prefs_path);
- int icon_index = dist->GetIconIndex();
- prefs.GetInt(installer::master_preferences::kChromeShortcutIconIndex,
- &icon_index);
+ if (FilePath::CompareEqualIgnoreCase(icon_path, chrome_exe)) {
+ prefs.GetInt(installer::master_preferences::kChromeShortcutIconIndex,
+ &icon_index);
+ }
if (create_new) {
return file_util::CreateShortcutLink(
chrome_exe.c_str(), // target
@@ -1068,7 +1081,7 @@
chrome_path.c_str(), // working dir
arguments.c_str(), // arguments
description.c_str(), // description
- chrome_exe.c_str(), // icon file
+ icon_path.c_str(), // icon file
icon_index, // icon index
dist->GetBrowserAppId().c_str()); // app id
} else {
@@ -1078,7 +1091,7 @@
chrome_path.c_str(), // working dir
arguments.c_str(), // arguments
description.c_str(), // description
- chrome_exe.c_str(), // icon file
+ icon_path.c_str(), // icon file
icon_index, // icon index
dist->GetBrowserAppId().c_str()); // app id
}
« no previous file with comments | « chrome/installer/util/shell_util.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698