summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-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
-rw-r--r--chrome/common/chrome_switches.cc19
-rw-r--r--chrome/common/chrome_switches.h10
-rw-r--r--chrome/common/extensions/extension.cc2
19 files changed, 37 insertions, 48 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(
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 5748f22..7b1e3641 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -41,13 +41,16 @@ 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 kAppLauncherForNewTab[] = "app-launcher-new-tab";
+const char kAppsPanel[] = "apps-panel";
// The title to use for the gallery link in the app launcher.
-const char kAppLauncherGalleryTitle[] = "app-launcher-gallery-title";
+const char kAppsGalleryTitle[] = "apps-gallery-title";
// The URL to use for the gallery link in the app launcher.
-const char kAppLauncherGalleryURL[] = "app-launcher-gallery-url";
+const char kAppsGalleryURL[] = "apps-gallery-url";
+
+// Disable throbber for extension apps.
+const char kAppsNoThrob[] = "apps-no-throb";
// Whether to display the "Debug" link for app launch behavior.
const char kAppsDebug[] = "apps-debug";
@@ -205,10 +208,6 @@ 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";
@@ -245,6 +244,9 @@ 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.
@@ -267,9 +269,6 @@ 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 400791d..c22fc24 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -26,10 +26,11 @@ 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[];
@@ -74,7 +75,6 @@ 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 6245a98..db6e934 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::kEnableExtensionApps);
+ switches::kEnableApps);
location_ = INVALID;
#if defined(OS_WIN)