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

Unified Diff: chrome/browser/web_applications/web_app.cc

Issue 399045: Set prop app id for chromium/application shortcut. (Closed)
Patch Set: more for hbono Created 11 years, 1 month 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/web_applications/web_app.cc
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index 1c55c4becd458ebdcd9eb1bb20284872499bae4f..7823d2be2028a5a018251609c75c9ae2a4f78d7a 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -269,7 +269,8 @@ bool CreateShortcutTask::CreateShortcut() {
wide_switchs.c_str(),
shortcut_info_.description.c_str(),
icon_file.value().c_str(),
- 0);
+ 0,
+ web_app::GenerateApplicationNameFromURL(shortcut_info_.url).c_str());
}
if (success && pin_to_taskbar) {
@@ -290,6 +291,14 @@ bool CreateShortcutTask::CreateShortcut() {
namespace web_app {
+std::wstring GenerateApplicationNameFromURL(const GURL& url) {
+ std::string t;
+ t.append(url.host());
+ t.append("_");
+ t.append(url.path());
+ return UTF8ToWide(t);
+}
+
void CreateShortcut(
const FilePath& data_dir,
const ShellIntegration::ShortcutInfo& shortcut_info,

Powered by Google App Engine
This is Rietveld 408576698