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

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

Issue 10534108: Disable platform app shortcut creation on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « 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/app_shortcut_manager.cc
diff --git a/chrome/browser/extensions/app_shortcut_manager.cc b/chrome/browser/extensions/app_shortcut_manager.cc
index 4d8fb70b75ac1fedc6dea24759e33e8ccb63f041..f3625858d2b0534498e5873f6647bb0e5bba5c8b 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -62,10 +62,14 @@ void AppShortcutManager::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED);
- const Extension* extension = content::Details<const Extension>(details).ptr();
- if (!disable_shortcut_creation_for_tests && extension->is_platform_app() &&
- extension->location() != Extension::LOAD)
- InstallApplicationShortcuts(extension);
+ #if !defined(OS_MACOSX)
+ const Extension* extension = content::Details<const Extension>(
+ details).ptr();
+ if (!disable_shortcut_creation_for_tests &&
+ extension->is_platform_app() &&
+ extension->location() != Extension::LOAD)
+ InstallApplicationShortcuts(extension);
+ #endif
}
// static
@@ -75,14 +79,6 @@ void AppShortcutManager::SetShortcutCreationDisabledForTesting(bool disabled) {
void AppShortcutManager::InstallApplicationShortcuts(
const Extension* extension) {
-#if defined(OS_MACOSX)
- // TODO(sail): For now only install shortcuts if enable platform apps is true.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnablePlatformApps)) {
- return;
- }
-#endif
-
shortcut_info_.extension_id = extension->id();
shortcut_info_.url = GURL(extension->launch_web_url());
shortcut_info_.title = UTF8ToUTF16(extension->name());
« 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