summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 08:19:18 +0000
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 08:19:18 +0000
commit93660ab3f5c895eb3e8a5f66d3af4669e16de21d (patch)
tree78b5d0a35b80fe32778694120f0f97a641bade0d /base/command_line.cc
parent6e2dd1fb35c02eac587a2cd16a7af98dde8535cb (diff)
downloadchromium_src-93660ab3f5c895eb3e8a5f66d3af4669e16de21d.zip
chromium_src-93660ab3f5c895eb3e8a5f66d3af4669e16de21d.tar.gz
chromium_src-93660ab3f5c895eb3e8a5f66d3af4669e16de21d.tar.bz2
Do not show sync promo when RestoreOnStartupURLs policy is set
When first_run_tabs are set through master_preferences, the sync promo should be shown if not explicitly suppressed. When RestoreOnStartupURLs is set through policy, the sync promo should never be shown. This is long-standing behavior, as evidenced here: http://crbug.com/125467#c26 That behavior recently regressed with the sync promo appearing even if RestoreOnStartupURLs are set. The regression happened here: https://chromiumcodereview.appspot.com/12638005 This CL fixes the regression by ensuring that when RestoreOnStartup=4 and RestoreOnStartupURLs are set, the sync promo is not shown. The CL also adds browser tests to protect against similar regressions in the future. BUG=244849 TEST=Manual and new browser_tests Review URL: https://chromiumcodereview.appspot.com/16141008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index b743d51..7d137f26 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -220,6 +220,7 @@ void CommandLine::InitFromArgv(int argc,
void CommandLine::InitFromArgv(const StringVector& argv) {
argv_ = StringVector(1);
+ switches_.clear();
begin_args_ = 1;
SetProgram(argv.empty() ? FilePath() : FilePath(argv[0]));
AppendSwitchesAndArguments(*this, argv);