summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 22:18:28 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 22:18:28 +0000
commit5ebc4b2de52f4eab4c814066ea4ac67b8992d06c (patch)
treee65e2f34ae4981e5d2f8b527d29fbd6ae525f793
parentc90ce8463d6e839010bf0b17ef1b4c0c54c8f067 (diff)
downloadchromium_src-5ebc4b2de52f4eab4c814066ea4ac67b8992d06c.zip
chromium_src-5ebc4b2de52f4eab4c814066ea4ac67b8992d06c.tar.gz
chromium_src-5ebc4b2de52f4eab4c814066ea4ac67b8992d06c.tar.bz2
Revert 47079 - Shorten several appsrelated flags. "256 characters should be enough for anyone's shortcut flags!"
Review URL: http://codereview.chromium.org/1991009 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/2010013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47081 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser.cc6
-rw-r--r--chrome/browser/browser_init.cc2
-rw-r--r--chrome/browser/dom_ui/app_launcher_handler.cc4
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc3
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.cc6
-rw-r--r--chrome/browser/extensions/extension_install_ui.cc3
-rw-r--r--chrome/browser/extensions/extensions_service.cc2
-rw-r--r--chrome/browser/profile.cc3
-rw-r--r--chrome/browser/shell_integration.cc5
-rw-r--r--chrome/browser/utility_process_host.cc4
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc2
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc3
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc3
-rw-r--r--chrome/common/chrome_switches.cc19
-rw-r--r--chrome/common/chrome_switches.h10
-rw-r--r--chrome/common/extensions/extension.cc2
16 files changed, 44 insertions, 33 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index aee74e5..80f5004 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1249,7 +1249,8 @@ void Browser::CloseWindow() {
void Browser::NewTab() {
UserMetrics::RecordAction(UserMetricsAction("NewTab"), profile_);
#if defined(OS_WIN)
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAppLauncherForNewTab)) {
AppLauncher::ShowForNewTab(this, std::string());
return;
}
@@ -2059,7 +2060,8 @@ void Browser::ExecuteCommand(int id) {
TabContents* Browser::AddBlankTab(bool foreground) {
// To make a more "launchy" experience, try to reuse an existing NTP if there
// is one.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExtensionApps)) {
for (int i = tabstrip_model_.count() - 1; i >= 0; --i) {
TabContents* contents = tabstrip_model_.GetTabContentsAt(i);
if (StartsWithASCII(contents->GetURL().spec(),
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 446ffa4..8a326ac 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -559,7 +559,7 @@ bool BrowserInit::LaunchWithProfile::IsAppLaunch(std::string* app_url,
*app_url = command_line_.GetSwitchValueASCII(switches::kApp);
return true;
}
- if (command_line_.HasSwitch(switches::kEnableApps) &&
+ if (command_line_.HasSwitch(switches::kEnableExtensionApps) &&
command_line_.HasSwitch(switches::kAppId)) {
if (app_id)
*app_id = command_line_.GetSwitchValueASCII(switches::kAppId);
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
index 2726cf6..8470f6b 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.cc
+++ b/chrome/browser/dom_ui/app_launcher_handler.cc
@@ -89,9 +89,9 @@ void AppLauncherHandler::HandleGetApps(const Value* value) {
// TODO(aa): Decide the final values for these and remove the switches.
gallery_title = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kAppsGalleryTitle);
+ switches::kAppLauncherGalleryTitle);
gallery_url = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kAppsGalleryURL);
+ switches::kAppLauncherGalleryURL);
bool show_debug_link = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAppsDebug);
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 693618e..39a2289 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -505,7 +505,8 @@ NewTabUI::NewTabUI(TabContents* contents)
if (ProfileSyncService::IsSyncEnabled()) {
AddMessageHandler((new NewTabPageSyncHandler())->Attach(this));
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExtensionApps)) {
ExtensionsService* service = GetProfile()->GetExtensionsService();
AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
}
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index 501c1d8..9b47274 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -87,7 +87,8 @@ void ShownSectionsHandler::SetFirstAppLauncherRunPref(
// If we have turned on Apps we want to hide most visited and recent to give
// more focus to the Apps section. We do not do this in MigrateUserPrefs
// because the pref version should not depend on command line switches.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps) &&
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExtensionApps) &&
!pref_service->GetBoolean(prefs::kNTPAppLauncherFirstRun)) {
int sections = pref_service->GetInteger(prefs::kNTPShownSections);
sections &= ~THUMB;
@@ -101,7 +102,8 @@ void ShownSectionsHandler::SetFirstAppLauncherRunPref(
void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) {
pref_service->RegisterIntegerPref(prefs::kNTPShownSections,
THUMB | RECENT | TIPS | SYNC);
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExtensionApps)) {
pref_service->RegisterBooleanPref(prefs::kNTPAppLauncherFirstRun, false);
}
}
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 860a24f..620cc01 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -205,7 +205,8 @@ void ExtensionInstallUI::OnInstallSuccess(Extension* extension) {
std::string hash_params = "app-id=";
hash_params += extension->id();
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAppLauncherForNewTab)) {
#if defined(TOOLKIT_VIEWS)
AppLauncher::ShowForNewTab(browser, hash_params);
#else
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 5b9a1e1..4dfeff5 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -138,7 +138,7 @@ bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url,
// Allow command line gallery url to be referrer for the gallery downloads.
std::string command_line_gallery_url =
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kAppsGalleryURL);
+ switches::kAppLauncherGalleryURL);
if (!command_line_gallery_url.empty() &&
StartsWithASCII(download_url.spec(),
extension_urls::kGalleryDownloadPrefix, false) &&
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 449085f..be95189 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -754,7 +754,8 @@ void ProfileImpl::InitExtensions() {
// Some sample apps to make our lives easier while we are developing extension
// apps. This way we don't have to constantly install these over and over.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExtensionApps)) {
#if defined(OS_WIN)
std::string user_domain;
if (base::EnvVarGetter::Create()->GetEnv("USERDOMAIN", &user_domain) &&
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 23d9fcb..9590cbb 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -39,10 +39,11 @@ std::string ShellIntegration::GetCommandLineArgumentsCommon(const GURL& url,
// If |extension_app_id| is present, we use the kAppId switch rather than
// the kApp switch (the launch url will be read from the extension app
// during launch.
- if (cmd.HasSwitch(switches::kEnableApps) && !extension_app_id.empty()) {
+ if (cmd.HasSwitch(switches::kEnableExtensionApps) &&
+ !extension_app_id.empty()) {
arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kAppId) +
L"=\"" + ASCIIToWide(UTF16ToASCII(extension_app_id)) + L"\" --" +
- ASCIIToWide(switches::kEnableApps);
+ ASCIIToWide(switches::kEnableExtensionApps);
} else {
// Use '--app=url' instead of just 'url' to launch the browser with minimal
// chrome.
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 324a7f5..118234d7e 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -115,8 +115,8 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
if (browser_command_line.HasSwitch(switches::kChromeFrame))
cmd_line->AppendSwitch(switches::kChromeFrame);
- if (browser_command_line.HasSwitch(switches::kEnableApps))
- cmd_line->AppendSwitch(switches::kEnableApps);
+ if (browser_command_line.HasSwitch(switches::kEnableExtensionApps))
+ cmd_line->AppendSwitch(switches::kEnableExtensionApps);
if (browser_command_line.HasSwitch(
switches::kEnableExperimentalExtensionApis)) {
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 33d3b8e..5cf5469 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -463,7 +463,7 @@ void BookmarkBarView::SetPageNavigator(PageNavigator* navigator) {
gfx::Size BookmarkBarView::GetPreferredSize() {
// We don't want the bookmark bar view in the app launcher new tab page.
static bool extension_apps = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableApps);
+ switches::kEnableExtensionApps);
bool show_bookmark_bar = !(extension_apps && OnNewTabPage());
if (show_bookmark_bar)
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index ccf39ca..e9d47aa 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -348,7 +348,8 @@ void TabRenderer::UpdateData(TabContents* contents,
// If this is an extension app and a command line flag is set,
// then disable the throbber.
throbber_disabled_ = data_.app &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsNoThrob);
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableThrobberForExtensionApps);
// TODO(glen): Temporary hax.
theme_provider_ = contents->profile()->GetThemeProvider();
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 5681a22..f88aaa4 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -955,7 +955,8 @@ void TabStrip::ButtonPressed(views::Button* sender, const views::Event& event) {
// TODO(jcampan): if we decide to keep the app launcher as the default
// behavior for the new tab button, we should add a method
// on the TabStripDelegate to do so.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAppLauncherForNewTab)) {
NavigationController& controller =
model_->GetSelectedTabContents()->controller();
AppLauncher::ShowForNewTab(
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 1bc4a51..a3e5df5 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -41,16 +41,13 @@ const char kAppId[] = "app-id";
const char kAppLaunchAsPanel[] = "app-launch-as-panel";
// Makes the app launcher popup when a new tab is created.
-const char kAppsPanel[] = "apps-panel";
+const char kAppLauncherForNewTab[] = "app-launcher-new-tab";
// The title to use for the gallery link in the app launcher.
-const char kAppsGalleryTitle[] = "apps-gallery-title";
+const char kAppLauncherGalleryTitle[] = "app-launcher-gallery-title";
// The URL to use for the gallery link in the app launcher.
-const char kAppsGalleryURL[] = "apps-gallery-url";
-
-// Disable throbber for extension apps.
-const char kAppsNoThrob[] = "apps-no-throb";
+const char kAppLauncherGalleryURL[] = "app-launcher-gallery-url";
// Whether to display the "Debug" link for app launch behavior.
const char kAppsDebug[] = "apps-debug";
@@ -208,6 +205,10 @@ const char kDisableSyncThemes[] = "disable-sync-themes";
// Disable syncing of typed urls.
const char kDisableSyncTypedUrls[] = "disable-sync-typed-urls";
+// Disable throbber for extension apps.
+const char kDisableThrobberForExtensionApps[] =
+ "disable-throbber-for-extension-apps";
+
// Enables the backend service for web resources, used in the new tab page for
// loading tips and recommendations from a JSON feed.
const char kDisableWebResources[] = "disable-web-resources";
@@ -244,9 +245,6 @@ const char kDumpHistogramsOnExit[] = "dump-histograms-on-exit";
// Enables AeroPeek for each tab. (This switch only works on Windows 7).
const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs";
-// Enable experimental extension apps.
-const char kEnableApps[] = "enable-apps";
-
// Enable the inclusion of non-standard ports when generating the Kerberos SPN
// in response to a Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN
// for more background.
@@ -269,6 +267,9 @@ const char kEnableExperimentalExtensionApis[] =
// Enable experimental WebGL support.
const char kEnableExperimentalWebGL[] = "enable-webgl";
+// Enable experimental extension apps.
+const char kEnableExtensionApps[] = "enable-extension-apps";
+
// Enable experimental timeline API.
const char kEnableExtensionTimelineApi[] = "enable-extension-timeline-api";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index ace5638..cd969df 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -26,11 +26,10 @@ extern const char kAlwaysEnableDevTools[];
extern const char kApp[];
extern const char kAppId[];
extern const char kAppLaunchAsPanel[];
+extern const char kAppLauncherForNewTab[];
+extern const char kAppLauncherGalleryTitle[];
+extern const char kAppLauncherGalleryURL[];
extern const char kAppsDebug[];
-extern const char kAppsPanel[];
-extern const char kAppsGalleryTitle[];
-extern const char kAppsGalleryURL[];
-extern const char kAppsNoThrob[];
extern const char kAuthServerWhitelist[];
extern const char kAutomationClientChannelID[];
extern const char kBookmarkMenu[];
@@ -75,6 +74,7 @@ extern const char kDisableSyncBookmarks[];
extern const char kDisableSyncPreferences[];
extern const char kDisableSyncThemes[];
extern const char kDisableSyncTypedUrls[];
+extern const char kDisableThrobberForExtensionApps[];
extern const char kDisableWebResources[];
extern const char kDisableWebSecurity[];
extern const char kDisableWebSockets[];
@@ -85,12 +85,12 @@ extern const char kDnsPrefetchDisable[];
extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
extern const char kEnableAeroPeekTabs[];
-extern const char kEnableApps[];
extern const char kEnableAuthNegotiatePort[];
extern const char kEnableBenchmarking[];
extern const char kEnableCloudPrintProxy[];
extern const char kEnableExperimentalExtensionApis[];
extern const char kEnableExperimentalWebGL[];
+extern const char kEnableExtensionApps[];
extern const char kEnableExtensionTimelineApi[];
extern const char kEnableExtensionToolstrips[];
extern const char kEnableFastback[];
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index db6e934..6245a98 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -724,7 +724,7 @@ Extension::Extension(const FilePath& path)
DCHECK(path.IsAbsolute());
apps_enabled_ = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableApps);
+ switches::kEnableExtensionApps);
location_ = INVALID;
#if defined(OS_WIN)