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

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

Issue 9346013: Publish app shortcuts on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 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
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 84397982cc4e10874b4d7d1a24dfd29d71d0adef..c266a85b820a9df21dee06f12ca029291ff7f590 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2635,7 +2635,16 @@ ExtensionService::NaClModuleInfoList::iterator
void ExtensionService::StartInstallApplicationShortcut(
Mihai Parparita -not on Chrome 2012/02/08 23:03:02 This code is moving in http://codereview.chromium.
const Extension* extension) {
-#if !defined(OS_MACOSX)
+#if defined(OS_MACOSX)
+ // TODO(sail): For now only install shortcuts if enable platform apps is true
+ // and if the extension is a platform app.
+ if (!extension->is_platform_app() ||
Mihai Parparita -not on Chrome 2012/02/08 23:03:02 This is already checked before StartInstallApplica
sail 2012/02/09 22:23:52 Done.
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePlatformApps)) {
+ return;
+ }
+#endif
+
const int kAppIconSize = 32;
shortcut_info_.extension_id = extension->id();
@@ -2671,7 +2680,6 @@ void ExtensionService::StartInstallApplicationShortcut(
icon_resource,
max_size,
ImageLoadingTracker::DONT_CACHE);
-#endif
}
void ExtensionService::OnImageLoaded(SkBitmap *image,

Powered by Google App Engine
This is Rietveld 408576698