• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "base/test/scoped_command_line.h"
6 
7 namespace base {
8 namespace test {
9 
ScopedCommandLine()10 ScopedCommandLine::ScopedCommandLine()
11     : original_command_line_(*base::CommandLine::ForCurrentProcess()) {}
12 
~ScopedCommandLine()13 ScopedCommandLine::~ScopedCommandLine() {
14   *base::CommandLine::ForCurrentProcess() = original_command_line_;
15 }
16 
GetProcessCommandLine()17 CommandLine* ScopedCommandLine::GetProcessCommandLine() {
18   return base::CommandLine::ForCurrentProcess();
19 }
20 
21 }  // namespace test
22 }  // namespace base
23