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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 6526040: CommandLine refactoring and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Test Created 9 years, 10 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: chrome/test/in_process_browser_test.cc
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 45cb676e6b67ffae68714d2b3795c41f514f01c3..7843ed0f6881978b7cae8373e0faaad560fc47b2 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -104,7 +104,7 @@ void InProcessBrowserTest::SetUp() {
// running in single process mode, we can't let one test's command-line
// changes (e.g. enabling DOM automation) affect other tests.
// TODO(phajdan.jr): This save/restore logic is unnecessary. Remove it.
- CommandLine* command_line = CommandLine::ForCurrentProcessMutable();
+ CommandLine* command_line = CommandLine::current_process_commandline_;
Paweł Hajdan Jr. 2011/02/25 18:01:53 nit: Accessing a private variable like that is ugl
msw 2011/05/10 23:18:43 Done (r76339).
original_command_line_.reset(new CommandLine(*command_line));
// Create a temporary user data directory if required.
@@ -216,7 +216,7 @@ void InProcessBrowserTest::PrepareTestCommandLine(
}
bool InProcessBrowserTest::CreateUserDataDirectory() {
- CommandLine* command_line = CommandLine::ForCurrentProcessMutable();
+ static CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath user_data_dir =
command_line->GetSwitchValuePath(switches::kUserDataDir);
if (user_data_dir.empty()) {
@@ -243,7 +243,7 @@ void InProcessBrowserTest::TearDown() {
BrowserView::SetShowState(-1);
#endif
- *CommandLine::ForCurrentProcessMutable() = *original_command_line_;
+ *CommandLine::current_process_commandline_ = *original_command_line_;
RenderProcessHost::set_run_renderer_in_process(original_single_process_);
}

Powered by Google App Engine
This is Rietveld 408576698