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

Unified Diff: base/test_suite.h

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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
« no previous file with comments | « base/process_util_linux.cc ('k') | chrome/app/breakpad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test_suite.h
diff --git a/base/test_suite.h b/base/test_suite.h
index 01b39fa6131bbe99e219cee263b420cf4af69c02..2aacecde961a1e95485fd4c53c2cdfba4f4b459b 100644
--- a/base/test_suite.h
+++ b/base/test_suite.h
@@ -31,7 +31,7 @@ class TestSuite {
public:
TestSuite(int argc, char** argv) {
base::EnableTerminationOnHeapCorruption();
- CommandLine::SetArgcArgv(argc, argv);
+ CommandLine::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
#if defined(OS_LINUX)
gtk_init_check(&argc, &argv);
@@ -48,7 +48,8 @@ class TestSuite {
base::ScopedNSAutoreleasePool scoped_pool;
Initialize();
- std::wstring client_func = CommandLine().GetSwitchValue(kRunClientProcess);
+ std::wstring client_func =
+ CommandLine::ForCurrentProcess()->GetSwitchValue(kRunClientProcess);
// Check to see if we are being run as a client process.
if (!client_func.empty()) {
// Convert our function name to a usable string for GetProcAddress.
@@ -101,7 +102,7 @@ class TestSuite {
#if defined(OS_WIN)
// In some cases, we do not want to see standard error dialogs.
if (!IsDebuggerPresent() &&
- !CommandLine().HasSwitch(L"show-error-dialogs")) {
+ !CommandLine::ForCurrentProcess()->HasSwitch(L"show-error-dialogs")) {
SuppressErrorDialogs();
logging::SetLogAssertHandler(UnitTestAssertHandler);
}
« no previous file with comments | « base/process_util_linux.cc ('k') | chrome/app/breakpad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698