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

Unified Diff: chrome/browser/extensions/bookmark_app_helper.cc

Issue 935893002: Don't show launcher or chrome://apps after adding a bookmark app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on mac; incognito on mac Created 5 years, 10 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/extensions/bookmark_app_helper.cc
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc
index 0954109b105a18ee6056a52431a37c1188611d4e..b7e8db5e2a11c94dd8c5878f72365b2e2980b922 100644
--- a/chrome/browser/extensions/bookmark_app_helper.cc
+++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -422,11 +422,11 @@ void BookmarkAppHelper::FinishInstallation(const Extension* extension) {
// Pin the app to the relevant launcher depending on the OS.
Profile* current_profile = profile_->GetOriginalProfile();
- chrome::HostDesktopType desktop = browser->host_desktop_type();
// On Mac, shortcuts are automatically created for hosted apps when they are
-// installed, so there is no need to call this again."
+// installed, so there is no need to create them again.
#if !defined(OS_MACOSX)
+ chrome::HostDesktopType desktop = browser->host_desktop_type();
if (desktop != chrome::HOST_DESKTOP_TYPE_ASH) {
web_app::ShortcutLocations creation_locations;
#if defined(OS_LINUX)
@@ -446,28 +446,12 @@ void BookmarkAppHelper::FinishInstallation(const Extension* extension) {
}
#endif
- // Show the newly installed app in the app launcher, in finder (on Mac) or
- // chrome://apps.
- if (IsAppLauncherEnabled()) {
- AppListService::Get(desktop)
- ->ShowForAppInstall(current_profile, extension->id(), false);
#if defined(OS_MACOSX)
- } else if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableHostedAppShimCreation)) {
- web_app::RevealAppShimInFinderForApp(profile_, extension);
-#endif
- } else {
- chrome::NavigateParams params(current_profile,
- GURL(chrome::kChromeUIAppsURL),
- ui::PAGE_TRANSITION_LINK);
- params.disposition = SINGLETON_TAB;
- chrome::Navigate(&params);
-
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
- content::Source<content::WebContents>(params.target_contents),
- content::Details<const std::string>(&extension->id()));
+ web_app::RevealAppShimInFinderForApp(current_profile, extension);
}
+#endif
callback_.Run(extension, web_app_info_);
}
« 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