summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-07 08:32:59 +0000
committerjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-07 08:32:59 +0000
commit4f0855b4c2848d9a9e0d3bbd933ed2c59cd3d4e3 (patch)
tree6285a20174fc708ae6a79b03e6e2cbb2b9383a1e /apps
parente9c3662f70af48bf571bc515b768ddb31dfe539a (diff)
downloadchromium_src-4f0855b4c2848d9a9e0d3bbd933ed2c59cd3d4e3.zip
chromium_src-4f0855b4c2848d9a9e0d3bbd933ed2c59cd3d4e3.tar.gz
chromium_src-4f0855b4c2848d9a9e0d3bbd933ed2c59cd3d4e3.tar.bz2
Create app shim on app install.
BUG=168080 Review URL: https://chromiumcodereview.appspot.com/15965005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204756 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/shortcut_manager.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/shortcut_manager.cc b/apps/shortcut_manager.cc
index 4c637ee..2176abca 100644
--- a/apps/shortcut_manager.cc
+++ b/apps/shortcut_manager.cc
@@ -5,6 +5,7 @@
#include "apps/shortcut_manager.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
@@ -12,6 +13,7 @@
#include "chrome/browser/ui/web_applications/web_app_ui.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -50,7 +52,12 @@ void ShortcutManager::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
-#if !defined(OS_MACOSX)
+#if defined(OS_MACOSX)
+ if (!CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kEnableAppShims))
+ break;
+#endif // defined(OS_MACOSX)
+
const extensions::InstalledExtensionInfo* installed_info =
content::Details<const extensions::InstalledExtensionInfo>(details)
.ptr();
@@ -74,7 +81,6 @@ void ShortcutManager::Observe(int type,
web_app::UpdateShortcutInfoAndIconForApp(*extension, profile_,
create_or_update);
}
-#endif // !defined(OS_MACOSX)
break;
}
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {