From 1a2a571b157327f75acd56bd594ef0863481dc32 Mon Sep 17 00:00:00 2001 From: "atwilson@chromium.org" Date: Fri, 31 Dec 2010 22:08:26 +0000 Subject: Enable BackgroundMode by default on all non-cros platforms. BUG=59980 TEST=existing tests suffice Review URL: http://codereview.chromium.org/6087003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70344 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/about_flags.cc | 7 ------- chrome/browser/background_mode_manager.cc | 14 ++++++-------- chrome/browser/background_mode_manager_unittest.cc | 1 - 3 files changed, 6 insertions(+), 16 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 5085859..a37f7a3 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -152,13 +152,6 @@ const Experiment kExperiments[] = { SINGLE_VALUE_TYPE(switches::kEnableXSSAuditor) }, { - "background-webapps", // FLAGS:RECORD_UMA - IDS_FLAGS_BACKGROUND_WEBAPPS_NAME, - IDS_FLAGS_BACKGROUND_WEBAPPS_DESCRIPTION, - kOsLinux, // Enabled by default on windows and mac, not available on CrOS. - SINGLE_VALUE_TYPE(switches::kEnableBackgroundMode) - }, - { "conflicting-modules-check", // FLAGS:RECORD_UMA IDS_FLAGS_CONFLICTS_CHECK_NAME, IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION, diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc index 74c0df6..3af5779 100644 --- a/chrome/browser/background_mode_manager.cc +++ b/chrome/browser/background_mode_manager.cc @@ -364,16 +364,14 @@ bool BackgroundModeManager::IsBackgroundModeEnabled( const CommandLine* command_line) { // Background mode is disabled if the appropriate flag is passed, or if - // extensions are disabled. + // extensions are disabled. It's always disabled on chromeos since chrome + // is always running on that platform, making it superfluous. +#if defined(OS_CHROMEOS) + return false; +#else bool background_mode_enabled = !command_line->HasSwitch(switches::kDisableBackgroundMode) && !command_line->HasSwitch(switches::kDisableExtensions); -#if !(defined(OS_WIN) || defined(OS_MACOSX)) - // BackgroundMode is enabled by default on windows and mac. On other - // platforms, it is enabled via about:flags. - background_mode_enabled = background_mode_enabled && - command_line->HasSwitch(switches::kEnableBackgroundMode); -#endif - return background_mode_enabled; +#endif } diff --git a/chrome/browser/background_mode_manager_unittest.cc b/chrome/browser/background_mode_manager_unittest.cc index 989c72d..d47d8e0 100644 --- a/chrome/browser/background_mode_manager_unittest.cc +++ b/chrome/browser/background_mode_manager_unittest.cc @@ -21,7 +21,6 @@ class BackgroundModeManagerTest : public testing::Test { ~BackgroundModeManagerTest() {} void SetUp() { command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); - command_line_->AppendSwitch(switches::kEnableBackgroundMode); } scoped_ptr command_line_; }; -- cgit v1.1