diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-29 15:12:46 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-29 15:12:46 +0000 |
commit | 8cc6e41efa5af14f403cbb14b15e3af8ea686c93 (patch) | |
tree | 7a190720f5c9a3751502ae525b1ad7acad8143be /chrome_frame | |
parent | 06256e5dee1d1aa8e5feebe3399634408914a66e (diff) | |
download | chromium_src-8cc6e41efa5af14f403cbb14b15e3af8ea686c93.zip chromium_src-8cc6e41efa5af14f403cbb14b15e3af8ea686c93.tar.gz chromium_src-8cc6e41efa5af14f403cbb14b15e3af8ea686c93.tar.bz2 |
Don't allow Chrome to go into background mode when launched by GCF.
Doing so is broken in at least a few ways:
- in-use updates don't work as desired (must quit IE for 6h)
- there's no UX for quitting Chrome
Since extensions aren't really supported in GCF anyway, I don't see a problem with disallowing background mode.
BUG=97740
TEST=the easy way: fire up IE and visit gcf:about:version, confirm that --disable-background-mode is on the command line. the hard way: install a background extension via the registry mechanism then launch IE and visit gcf:about:version. now check to see if you have an extension process. if so, see that quitting IE makes all chrome.exe processes disappear.
Review URL: http://codereview.chromium.org/8070019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 4 | ||||
-rw-r--r-- | chrome_frame/chrome_launcher.cc | 9 | ||||
-rw-r--r-- | chrome_frame/chrome_launcher_unittest.cc | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index e120f14..2415932 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -263,6 +263,10 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, // Chrome Frame never wants Chrome to start up with a First Run UI. command_line->AppendSwitch(switches::kNoFirstRun); + // Chrome Frame never wants to run background extensions since they + // interfere with in-use updates. + command_line->AppendSwitch(switches::kDisableBackgroundMode); + command_line->AppendSwitch(switches::kDisablePopupBlocking); // Disable the "Whoa! Chrome has crashed." dialog, because that isn't very diff --git a/chrome_frame/chrome_launcher.cc b/chrome_frame/chrome_launcher.cc index c7ca618..d89fd8a 100644 --- a/chrome_frame/chrome_launcher.cc +++ b/chrome_frame/chrome_launcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,16 +21,17 @@ const wchar_t* kAllowedSwitches[] = { L"automation-channel", L"chrome-frame", L"chrome-version", + L"disable-background-mode", + L"disable-popup-blocking", L"disable-renderer-accessibility", L"enable-experimental-extension-apis", L"force-renderer-accessibility", + L"full-memory-crash-report", L"lang", L"no-default-browser-check", - L"noerrdialogs", L"no-first-run", + L"noerrdialogs", L"user-data-dir", - L"disable-popup-blocking", - L"full-memory-crash-report", }; const wchar_t kWhitespaceChars[] = { diff --git a/chrome_frame/chrome_launcher_unittest.cc b/chrome_frame/chrome_launcher_unittest.cc index 0f2db43..61c96dc 100644 --- a/chrome_frame/chrome_launcher_unittest.cc +++ b/chrome_frame/chrome_launcher_unittest.cc @@ -19,6 +19,7 @@ TEST(ChromeLauncher, IsValidCommandLine) { CommandLine good(FilePath(L"dummy.exe")); good.AppendSwitch(switches::kNoFirstRun); // in whitelist + good.AppendSwitch(switches::kDisableBackgroundMode); // in whitelist good.AppendSwitchASCII(switches::kUserDataDir, "foo"); // in whitelist EXPECT_TRUE(chrome_launcher::IsValidCommandLine( @@ -55,6 +56,7 @@ TEST(ChromeLauncher, TrimWhiteSpace) { TEST(ChromeLauncher, IsValidArgument) { EXPECT_TRUE(chrome_launcher::IsValidArgument(L"--chrome-frame")); + EXPECT_TRUE(chrome_launcher::IsValidArgument(L"--disable-background-mode")); EXPECT_FALSE(chrome_launcher::IsValidArgument(L"--invalid-arg")); EXPECT_TRUE(chrome_launcher::IsValidArgument(L"--chrome-frame=")); |