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

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

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests Created 5 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/browser/apps/shortcut_manager.cc
diff --git a/chrome/browser/apps/shortcut_manager.cc b/chrome/browser/apps/shortcut_manager.cc
index 412b6c84f1a6e6a5e9797de1480e3980e3eace25..3002bf65872e6336dc253e7db406785adde135fa 100644
--- a/chrome/browser/apps/shortcut_manager.cc
+++ b/chrome/browser/apps/shortcut_manager.cc
@@ -48,17 +48,10 @@ const int kUpdateShortcutsForAllAppsDelay = 10;
void CreateShortcutsForApp(Profile* profile, const Extension* app) {
web_app::ShortcutLocations creation_locations;
- if (extensions::util::IsEphemeralApp(app->id(), profile)) {
- // Ephemeral apps should not have visible shortcuts, but may still require
- // platform-specific handling.
- creation_locations.applications_menu_location =
- web_app::APP_MENU_LOCATION_HIDDEN;
- } else {
- // Creates a shortcut for an app in the Chrome Apps subdir of the
- // applications menu, if there is not already one present.
- creation_locations.applications_menu_location =
- web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS;
- }
+ // Creates a shortcut for an app in the Chrome Apps subdir of the
+ // applications menu, if there is not already one present.
+ creation_locations.applications_menu_location =
+ web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS;
web_app::CreateShortcuts(
web_app::SHORTCUT_CREATION_AUTOMATED, creation_locations, profile, app);
@@ -119,7 +112,6 @@ void AppShortcutManager::OnExtensionWillBeInstalled(
content::BrowserContext* browser_context,
const Extension* extension,
bool is_update,
- bool from_ephemeral,
const std::string& old_name) {
if (!extension->is_app())
return;
@@ -127,7 +119,7 @@ void AppShortcutManager::OnExtensionWillBeInstalled(
// 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 && !from_ephemeral) {
+ if (is_update) {
web_app::UpdateAllShortcuts(
base::UTF8ToUTF16(old_name), profile_, extension);
} else {

Powered by Google App Engine
This is Rietveld 408576698