diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 14:33:19 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 14:33:19 +0000 |
commit | fe13bf66690fa7bc1ff25c4714b9c72c3777ee2d (patch) | |
tree | 94e1f4559ffd7999e6c8e18f5744217beb93e97b /chrome/browser/dom_ui/app_launcher_handler.cc | |
parent | 5b885310bd6498cde3e3c3f821db56f2bd9e6e26 (diff) | |
download | chromium_src-fe13bf66690fa7bc1ff25c4714b9c72c3777ee2d.zip chromium_src-fe13bf66690fa7bc1ff25c4714b9c72c3777ee2d.tar.gz chromium_src-fe13bf66690fa7bc1ff25c4714b9c72c3777ee2d.tar.bz2 |
Re-land 57460 - Add hidden component app for web store.
Fixed ExtensionStartupTest which was essentially counting the number of component extensions. Now it doesn't.
Original review here: http://codereview.chromium.org/3116040
This patch adds a component which does not appear on the NTP, but does enforce that gallery urls are isolated in their own process. This is in anticipation of exposing extension api bindings to the gallery so it can install/detect/uninstall extensions & apps.
Note that this patch works correctly with the --apps-gallery-url. If specified, the replacement url will be inserted into the component app's extent
BUG=27431
TBR=aa
Review URL: http://codereview.chromium.org/3104039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/app_launcher_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/app_launcher_handler.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc index 825be90..d05ebf7 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.cc +++ b/chrome/browser/dom_ui/app_launcher_handler.cc @@ -16,6 +16,7 @@ #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" @@ -109,11 +110,13 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) { const ExtensionList* extensions = extensions_service_->extensions(); for (ExtensionList::const_iterator it = extensions->begin(); it != extensions->end(); ++it) { - if ((*it)->is_app()) { - DictionaryValue* app_info = new DictionaryValue(); - CreateAppInfo(*it, app_info); - list->Append(app_info); - } + // Don't include the WebStore component app. The WebStore launcher + // gets special treatment in ntp/apps.js. + if ((*it)->is_app() && (*it)->id() != extension_misc::kWebStoreAppId) { + DictionaryValue* app_info = new DictionaryValue(); + CreateAppInfo(*it, app_info); + list->Append(app_info); + } } dictionary.Set("apps", list); |