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

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: Self review, Devlin review. 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..884a5d91f92a8ec68ebed150031c9db5c031d5af 100644
--- a/chrome/browser/apps/shortcut_manager.cc
+++ b/chrome/browser/apps/shortcut_manager.cc
@@ -12,7 +12,6 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_ui_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -25,7 +24,6 @@
#include "content/public/common/content_switches.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
-#include "extensions/browser/extension_util.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/one_shot_event.h"
@@ -48,17 +46,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 +110,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 +117,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 {
« no previous file with comments | « chrome/browser/apps/shortcut_manager.h ('k') | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698