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

Side by Side Diff: chrome/test/layout_test_http_server.cc

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/live_sync/live_sync_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/layout_test_http_server.h" 5 #include "chrome/test/layout_test_http_server.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #if defined(OS_WIN) 80 #if defined(OS_WIN)
81 if (base::win::GetVersion() >= base::win::VERSION_WIN7) 81 if (base::win::GetVersion() >= base::win::VERSION_WIN7)
82 cmd_line.AppendArg("--run_background"); 82 cmd_line.AppendArg("--run_background");
83 #endif 83 #endif
84 84
85 // The Python script waits for the server to start responding to requests, 85 // The Python script waits for the server to start responding to requests,
86 // then exits. So we want to wait for the Python script to exit before 86 // then exits. So we want to wait for the Python script to exit before
87 // continuing. 87 // continuing.
88 base::LaunchOptions options; 88 base::LaunchOptions options;
89 options.wait = true; 89 options.wait = true;
90 running_ = base::LaunchProcess(cmd_line, options); 90 running_ = base::LaunchProcess(cmd_line, options, NULL);
91 return running_; 91 return running_;
92 } 92 }
93 93
94 bool LayoutTestHttpServer::Stop() { 94 bool LayoutTestHttpServer::Stop() {
95 if (!running_) { 95 if (!running_) {
96 LOG(ERROR) << "LayoutTestHttpServer not running."; 96 LOG(ERROR) << "LayoutTestHttpServer not running.";
97 return false; 97 return false;
98 } 98 }
99 99
100 CommandLine cmd_line(CommandLine::NO_PROGRAM); 100 CommandLine cmd_line(CommandLine::NO_PROGRAM);
101 if (!PrepareCommandLine(&cmd_line)) 101 if (!PrepareCommandLine(&cmd_line))
102 return false; 102 return false;
103 cmd_line.AppendArg("--server=stop"); 103 cmd_line.AppendArg("--server=stop");
104 104
105 base::LaunchOptions options; 105 base::LaunchOptions options;
106 options.wait = true; 106 options.wait = true;
107 bool stopped = base::LaunchProcess(cmd_line, options); 107 bool stopped = base::LaunchProcess(cmd_line, options, NULL);
108 running_ = !stopped; 108 running_ = !stopped;
109 return stopped; 109 return stopped;
110 } 110 }
111 111
OLDNEW
« no previous file with comments | « chrome/test/automation/proxy_launcher.cc ('k') | chrome/test/live_sync/live_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698