| Index: chrome/test/base/scoped_command_line_override.cc
|
| diff --git a/chrome/test/base/scoped_command_line_override.cc b/chrome/test/base/scoped_command_line_override.cc
|
| index bd4cb30a2ccb8f32aad22be81e42eda94a695957..372f93e5d946673ac9cda61871887ba0f4c1011f 100644
|
| --- a/chrome/test/base/scoped_command_line_override.cc
|
| +++ b/chrome/test/base/scoped_command_line_override.cc
|
| @@ -10,6 +10,28 @@ ScopedCommandLineOverride::ScopedCommandLineOverride(
|
| CommandLine::ForCurrentProcess()->AppendSwitch(new_switch);
|
| }
|
|
|
| +ScopedCommandLineOverride::ScopedCommandLineOverride(
|
| + CommandLine& old_command_line)
|
| + : old_command_line_(old_command_line) {}
|
| +
|
| +ScopedCommandLineOverride::ScopedCommandLineOverride(
|
| + const std::string& switch1,
|
| + const std::string& switch2)
|
| + : old_command_line_(*CommandLine::ForCurrentProcess()) {
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(switch1);
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(switch2);
|
| +}
|
| +
|
| +ScopedCommandLineOverride::ScopedCommandLineOverride(
|
| + const std::string& switch1,
|
| + const std::string& switch2,
|
| + const std::string& switch3)
|
| + : old_command_line_(*CommandLine::ForCurrentProcess()) {
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(switch1);
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(switch2);
|
| + CommandLine::ForCurrentProcess()->AppendSwitch(switch3);
|
| +}
|
| +
|
| ScopedCommandLineOverride::~ScopedCommandLineOverride() {
|
| *CommandLine::ForCurrentProcess() = old_command_line_;
|
| }
|
|
|