summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 18:24:19 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 18:24:19 +0000
commit893290ab807f68b3968d8437076901bf9bba4567 (patch)
treee1ac0e8ce9e94aa0edd0558c1672ed9b572b23f2 /chrome
parent635909faccd2bcabd0999e086a2d10c5b34d8062 (diff)
downloadchromium_src-893290ab807f68b3968d8437076901bf9bba4567.zip
chromium_src-893290ab807f68b3968d8437076901bf9bba4567.tar.gz
chromium_src-893290ab807f68b3968d8437076901bf9bba4567.tar.bz2
Hide NTP app launcher debug link behind a flag.
Review URL: http://codereview.chromium.org/2061004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/dom_ui/app_launcher_handler.cc3
-rw-r--r--chrome/browser/resources/new_new_tab.js4
-rw-r--r--chrome/common/chrome_switches.cc5
-rw-r--r--chrome/common/chrome_switches.h1
4 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 031686f..8470f6b 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -92,10 +92,13 @@ void AppLauncherHandler::HandleGetApps(const Value* value) {
switches::kAppLauncherGalleryTitle);
gallery_url = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kAppLauncherGalleryURL);
+ bool show_debug_link = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAppsDebug);
DictionaryValue dictionary;
dictionary.SetString(L"galleryTitle", gallery_title);
dictionary.SetString(L"galleryURL", gallery_url);
+ dictionary.SetBoolean(L"showDebugLink", show_debug_link);
ListValue* list = new ListValue();
const ExtensionList* extensions = extensions_service_->extensions();
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index f5a765c..936fb13 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -30,7 +30,9 @@ function getAppsCallback(data) {
// for everyone.
if (appsSection.hasChildNodes()) {
appsSection.classList.remove('disabled');
- debugSection.classList.remove('disabled');
+ if (data.showDebugLink) {
+ debugSection.classList.remove('disabled');
+ }
} else {
appsSection.classList.add('disabled');
debugSection.classList.add('disabled');
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index f581635..3cc7620 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -44,11 +44,14 @@ const char kAppLaunchAsPanel[] = "app-launch-as-panel";
const char kAppLauncherForNewTab[] = "app-launcher-new-tab";
// The title to use for the gallery link in the app launcher.
-const char kAppLauncherGalleryTitle[] = "app-launcher-gallery-title";
+const char kAppLauncherGalleryTitle[] = "app-launcher-gallery-title";
// The URL to use for the gallery link in the app launcher.
const char kAppLauncherGalleryURL[] = "app-launcher-gallery-url";
+// Whether to display the "Debug" link for app launch behavior.
+const char kAppsDebug[] = "apps-debug";
+
// Authentication white list for servers
const char kAuthServerWhitelist[] = "auth-server-whitelist";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 88c15fd..e4fda04 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -29,6 +29,7 @@ extern const char kAppLaunchAsPanel[];
extern const char kAppLauncherForNewTab[];
extern const char kAppLauncherGalleryTitle[];
extern const char kAppLauncherGalleryURL[];
+extern const char kAppsDebug[];
extern const char kAuthServerWhitelist[];
extern const char kAutomationClientChannelID[];
extern const char kBookmarkMenu[];