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

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

Issue 320503004: Refactored the ShortcutLocations.hidden flag on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 6 years, 6 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 | « chrome/browser/web_applications/web_app.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_linux.cc
diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc
index c15c8250ed1e15edcbb18b72cdb49789b2c73675..1cd7e05bf6202c37f7aad68edd390e3dd19f0e51 100644
--- a/chrome/browser/web_applications/web_app_linux.cc
+++ b/chrome/browser/web_applications/web_app_linux.cc
@@ -54,16 +54,18 @@ void UpdatePlatformShortcuts(
ShortcutLocations creation_locations =
shell_integration_linux::GetExistingShortcutLocations(
env.get(), shortcut_info.profile_path, shortcut_info.extension_id);
+
// Always create a hidden shortcut in applications if a visible one is not
// being created. This allows the operating system to identify the app, but
// not show it in the menu.
- creation_locations.hidden = true;
+ if (creation_locations.applications_menu_location == APP_MENU_LOCATION_NONE)
+ creation_locations.applications_menu_location = APP_MENU_LOCATION_HIDDEN;
CreatePlatformShortcuts(web_app_path,
shortcut_info,
file_handlers_info,
creation_locations,
- SHORTCUT_CREATION_BY_USER);
+ SHORTCUT_CREATION_AUTOMATED);
}
void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698