Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: base/test/command_line_test_util.cc

Issue 1908633002: Introduce ScopedCommandLine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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/command_line_test_util.h"
6
7 namespace base {
8 namespace test {
9
10 ScopedCommandLine::ScopedCommandLine()
Paweł Hajdan Jr. 2016/04/21 11:55:50 We have a very similar class in base/test/test_sui
robliao 2016/04/21 18:26:45 I wanted to hold off on chrome/browser/extensions/
11 : original_command_line_(*base::CommandLine::ForCurrentProcess()) {}
12
13 ScopedCommandLine::~ScopedCommandLine() {
14 *base::CommandLine::ForCurrentProcess() = original_command_line_;
15 }
16
17 CommandLine* ScopedCommandLine::GetProcessCommandLine() {
18 return base::CommandLine::ForCurrentProcess();
19 }
20
21 } // namespace test
22 } // namespace base
OLDNEW
« no previous file with comments | « base/test/command_line_test_util.h ('k') | chrome/browser/extensions/activity_log/activity_log_enabled_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698