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

Unified Diff: base/test/command_line_test_util.h

Issue 1908633002: Introduce ScopedCommandLine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update CrOS Unit Test 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 side-by-side diff with in-line comments
Download patch
Index: base/test/command_line_test_util.h
diff --git a/base/test/command_line_test_util.h b/base/test/command_line_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad0a7c5c9eb36331ad34623e86b4c4e6e7537827
--- /dev/null
+++ b/base/test/command_line_test_util.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_TEST_COMMAND_LINE_TEST_UTIL_H_
+#define BASE_TEST_COMMAND_LINE_TEST_UTIL_H_
+
+#include "base/command_line.h"
+
+namespace base {
+namespace test {
+
+class ScopedCommandLine final {
danakj 2016/04/22 18:57:10 Name this file after the class.
robliao 2016/04/22 19:42:35 Done.
+ public:
+ ScopedCommandLine();
+ ~ScopedCommandLine();
+
+ // Gets the command line for the current process.
+ // NOTE: Do not name this GetCommandLine as this will conflict with Windows's
+ // GetCommandLine and get renamed to GetCommandLineW.
+ CommandLine* GetProcessCommandLine();
+
+ private:
+ const CommandLine original_command_line_;
+};
+
+} // namespace test
+} // namespace base
+
+#endif // BASE_TEST_COMMAND_LINE_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698