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

Unified Diff: chrome/browser/apps/shortcut_manager.cc

Issue 300623004: Create start menu shortcut when an ephemeral app is promoted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@install_base
Patch Set: Rebase and optimize for extensions Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/shortcut_manager.cc
diff --git a/chrome/browser/apps/shortcut_manager.cc b/chrome/browser/apps/shortcut_manager.cc
index b61ff4a6cf31f346b5ddf35bc86c43438488476a..8a5de580b5a4367e8e443f66956a4ec3fdea2064 100644
--- a/chrome/browser/apps/shortcut_manager.cc
+++ b/chrome/browser/apps/shortcut_manager.cc
@@ -109,10 +109,13 @@ void AppShortcutManager::OnExtensionWillBeInstalled(
bool is_update,
bool from_ephemeral,
const std::string& old_name) {
+ if (!extension->is_app())
tmdiep 2014/05/28 05:13:34 Added optimization here to avoid scanning for shor
+ return;
+
// If the app is being updated, update any existing shortcuts but do not
// create new ones. If it is being installed, automatically create a
// shortcut in the applications menu (e.g., Start Menu).
- if (is_update) {
+ if (is_update && !from_ephemeral) {
web_app::UpdateAllShortcuts(
base::UTF8ToUTF16(old_name), profile_, extension);
} else if (ShouldCreateShortcutFor(profile_, extension)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698