Index: chrome/browser/about_flags.cc |
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
index d1e2fe9b0c851a0345bd7b5927fac9af31a449c4..89d43d0a7c695f47d553e000d50e41667cc791de 100644 |
--- a/chrome/browser/about_flags.cc |
+++ b/chrome/browser/about_flags.cc |
@@ -1667,7 +1667,8 @@ class FlagsState { |
public: |
FlagsState() : needs_restart_(false) {} |
void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
- CommandLine* command_line); |
+ CommandLine* command_line, |
+ SentinelsMode sentinels); |
bool IsRestartNeededToCommitChanges(); |
void SetExperimentEnabled( |
FlagsStorage* flags_storage, |
@@ -1833,9 +1834,11 @@ string16 Experiment::DescriptionForChoice(int index) const { |
} |
void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
- CommandLine* command_line) { |
+ CommandLine* command_line, |
+ SentinelsMode sentinels) { |
FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
- command_line); |
+ command_line, |
+ sentinels); |
} |
bool AreSwitchesIdenticalToCurrentCommandLine( |
@@ -1971,8 +1974,9 @@ void SetFlagToSwitchMapping(const std::string& key, |
(*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
} |
-void FlagsState::ConvertFlagsToSwitches( |
- FlagsStorage* flags_storage, CommandLine* command_line) { |
+void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
+ CommandLine* command_line, |
+ SentinelsMode sentinels) { |
if (command_line->HasSwitch(switches::kNoExperiments)) |
return; |
@@ -2005,10 +2009,12 @@ void FlagsState::ConvertFlagsToSwitches( |
} |
} |
- command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
- flags_switches_.insert( |
- std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
- std::string())); |
+ if (sentinels == kAddSentinels) { |
+ command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
+ flags_switches_.insert( |
+ std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
+ std::string())); |
+ } |
for (std::set<std::string>::iterator it = enabled_experiments.begin(); |
it != enabled_experiments.end(); |
++it) { |
@@ -2028,10 +2034,12 @@ void FlagsState::ConvertFlagsToSwitches( |
switch_and_value_pair.second); |
flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
} |
- command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
- flags_switches_.insert( |
- std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
- std::string())); |
+ if (sentinels == kAddSentinels) { |
+ command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
+ flags_switches_.insert( |
+ std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
+ std::string())); |
+ } |
} |
bool FlagsState::IsRestartNeededToCommitChanges() { |