summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 01:18:07 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-13 01:18:07 +0000
commit2bce5e17baa53ab9547a0dd8bb4c5eb005277264 (patch)
treea39552d4d2fa97b3781cf7331b9b8ad96c5cceb4 /chrome/browser
parentf6f2073d8c8fff901501eb4cc3f3e30a5467d608 (diff)
downloadchromium_src-2bce5e17baa53ab9547a0dd8bb4c5eb005277264.zip
chromium_src-2bce5e17baa53ab9547a0dd8bb4c5eb005277264.tar.gz
chromium_src-2bce5e17baa53ab9547a0dd8bb4c5eb005277264.tar.bz2
Re-land r47079: Shorten several appsrelated flags.
TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser.cc6
-rw-r--r--chrome/browser/browser_browsertest.cc4
-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/app_background_page_apitest.cc2
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc2
-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
16 files changed, 22 insertions, 32 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 80f5004..aee74e5 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1249,8 +1249,7 @@ void Browser::CloseWindow() {
void Browser::NewTab() {
UserMetrics::RecordAction(UserMetricsAction("NewTab"), profile_);
#if defined(OS_WIN)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAppLauncherForNewTab)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
AppLauncher::ShowForNewTab(this, std::string());
return;
}
@@ -2060,8 +2059,7 @@ 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::kEnableExtensionApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
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_browsertest.cc b/chrome/browser/browser_browsertest.cc
index a25414e..8d4f2db 100644
--- a/chrome/browser/browser_browsertest.cc
+++ b/chrome/browser/browser_browsertest.cc
@@ -133,7 +133,7 @@ class BrowserTest : public ExtensionBrowserTest {
ExtensionBrowserTest::SetUpCommandLine(command_line);
// Needed for phantom tab tests.
- command_line->AppendSwitch(switches::kEnableExtensionApps);
+ command_line->AppendSwitch(switches::kEnableApps);
}
// In RTL locales wrap the page title with RTL embedding characters so that it
@@ -616,7 +616,7 @@ class BrowserAppRefocusTest : public ExtensionBrowserTest {
protected:
virtual void SetUpCommandLine(CommandLine* command_line) {
ExtensionBrowserTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kEnableExtensionApps);
+ command_line->AppendSwitch(switches::kEnableApps);
}
// Common setup for all tests. Can't use SetUpInProcessBrowserTestFixture
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 8a326ac..446ffa4 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::kEnableExtensionApps) &&
+ if (command_line_.HasSwitch(switches::kEnableApps) &&
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 8470f6b..2726cf6 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::kAppLauncherGalleryTitle);
+ switches::kAppsGalleryTitle);
gallery_url = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kAppLauncherGalleryURL);
+ switches::kAppsGalleryURL);
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 39a2289..693618e 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -505,8 +505,7 @@ NewTabUI::NewTabUI(TabContents* contents)
if (ProfileSyncService::IsSyncEnabled()) {
AddMessageHandler((new NewTabPageSyncHandler())->Attach(this));
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
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 9b47274..501c1d8 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -87,8 +87,7 @@ 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::kEnableExtensionApps) &&
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps) &&
!pref_service->GetBoolean(prefs::kNTPAppLauncherFirstRun)) {
int sections = pref_service->GetInteger(prefs::kNTPShownSections);
sections &= ~THUMB;
@@ -102,8 +101,7 @@ void ShownSectionsHandler::SetFirstAppLauncherRunPref(
void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) {
pref_service->RegisterIntegerPref(prefs::kNTPShownSections,
THUMB | RECENT | TIPS | SYNC);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
pref_service->RegisterBooleanPref(prefs::kNTPAppLauncherFirstRun, false);
}
}
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc
index ff327da..06fb044 100644
--- a/chrome/browser/extensions/app_background_page_apitest.cc
+++ b/chrome/browser/extensions/app_background_page_apitest.cc
@@ -12,7 +12,7 @@ class AppBackgroundPageApiTest : public ExtensionApiTest {
public:
void SetUpCommandLine(CommandLine* command_line) {
ExtensionApiTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kEnableExtensionApps);
+ command_line->AppendSwitch(switches::kEnableApps);
command_line->AppendSwitch(switches::kDisablePopupBlocking);
}
};
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index caade3d..c86e165 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -17,7 +17,7 @@ class AppApiTest : public ExtensionApiTest {
public:
void SetUpCommandLine(CommandLine* command_line) {
ExtensionApiTest::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kEnableExtensionApps);
+ command_line->AppendSwitch(switches::kEnableApps);
}
};
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 620cc01..860a24f 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -205,8 +205,7 @@ void ExtensionInstallUI::OnInstallSuccess(Extension* extension) {
std::string hash_params = "app-id=";
hash_params += extension->id();
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAppLauncherForNewTab)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
#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 4dfeff5..5b9a1e1 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::kAppLauncherGalleryURL);
+ switches::kAppsGalleryURL);
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 be95189..449085f 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -754,8 +754,7 @@ 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::kEnableExtensionApps)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
#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 9590cbb..23d9fcb 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -39,11 +39,10 @@ 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::kEnableExtensionApps) &&
- !extension_app_id.empty()) {
+ if (cmd.HasSwitch(switches::kEnableApps) && !extension_app_id.empty()) {
arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kAppId) +
L"=\"" + ASCIIToWide(UTF16ToASCII(extension_app_id)) + L"\" --" +
- ASCIIToWide(switches::kEnableExtensionApps);
+ ASCIIToWide(switches::kEnableApps);
} 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 118234d7e..324a7f5 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::kEnableExtensionApps))
- cmd_line->AppendSwitch(switches::kEnableExtensionApps);
+ if (browser_command_line.HasSwitch(switches::kEnableApps))
+ cmd_line->AppendSwitch(switches::kEnableApps);
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 5cf5469..33d3b8e 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::kEnableExtensionApps);
+ switches::kEnableApps);
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 e9d47aa..ccf39ca 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -348,8 +348,7 @@ 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::kDisableThrobberForExtensionApps);
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsNoThrob);
// 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 f88aaa4..5681a22 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -955,8 +955,7 @@ 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::kAppLauncherForNewTab)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
NavigationController& controller =
model_->GetSelectedTabContents()->controller();
AppLauncher::ShowForNewTab(