diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 20:02:07 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 20:02:07 +0000 |
commit | e2ddbc98387020635356b65858ec0bf35966fdc2 (patch) | |
tree | 4b64552845637c9a7e103eda9dcd872aa0572e85 /chrome/browser/browser_shutdown.cc | |
parent | ae26e29cd1f5229604b98eef776670c92c3b1009 (diff) | |
download | chromium_src-e2ddbc98387020635356b65858ec0bf35966fdc2.zip chromium_src-e2ddbc98387020635356b65858ec0bf35966fdc2.tar.gz chromium_src-e2ddbc98387020635356b65858ec0bf35966fdc2.tar.bz2 |
about:flags: Fix disabling experiments.
The problem was that the restart code would copy the switches added by about:flags to the restarted instance, so that e.g. --enable-expose-for-tabs would be passed on the the command line even though the experiment was disabled. Now the flags added by about:switches are explicitly removed before the restart.
Also wrap the switches added by about:flags with --start-flags-switches and --end-flags-switches switches. These unknown switches are ignored, but are useful to see on about:version.
Also add a bunch of unrelated unit tests.
BUG=56314
TEST=See bug.
Review URL: http://codereview.chromium.org/3813007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 9e7d411..98e0af7 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -18,6 +18,7 @@ #include "base/thread.h" #include "base/time.h" #include "build/build_config.h" +#include "chrome/browser/about_flags.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" @@ -182,6 +183,7 @@ void Shutdown() { std::map<std::string, CommandLine::StringType> switches = old_cl.GetSwitches(); // Remove the switches that shouldn't persist across restart. + about_flags::RemoveFlagsSwitches(&switches); switches::RemoveSwitchesForAutostart(&switches); // Append the old switches to the new command line. for (std::map<std::string, CommandLine::StringType>::const_iterator i = |