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

Side by Side Diff: net/test/python_utils.cc

Issue 296513013: Cleanup: Use base::CommandLine in net/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 6 years, 7 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 | « net/spdy/fuzzing/hpack_fuzz_wrapper.cc ('k') | net/test/python_utils_unittest.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 "net/test/python_utils.h" 5 #include "net/test/python_utils.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return false; 99 return false;
100 } 100 }
101 } 101 }
102 generated_code_dir = *dir; 102 generated_code_dir = *dir;
103 #endif 103 #endif
104 *dir = generated_code_dir.Append(kPyProto); 104 *dir = generated_code_dir.Append(kPyProto);
105 VLOG(2) << "Found " << kPyProto.value() << " in " << dir->value(); 105 VLOG(2) << "Found " << kPyProto.value() << " in " << dir->value();
106 return true; 106 return true;
107 } 107 }
108 108
109 bool GetPythonCommand(CommandLine* python_cmd) { 109 bool GetPythonCommand(base::CommandLine* python_cmd) {
110 DCHECK(python_cmd); 110 DCHECK(python_cmd);
111 111
112 #if defined(OS_WIN) 112 #if defined(OS_WIN)
113 // This permits finding the proper python in path even if it is a .bat file. 113 // This permits finding the proper python in path even if it is a .bat file.
114 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("cmd.exe"))); 114 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("cmd.exe")));
115 python_cmd->AppendArg("/c"); 115 python_cmd->AppendArg("/c");
116 python_cmd->AppendArg("python"); 116 python_cmd->AppendArg("python");
117 #else 117 #else
118 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python"))); 118 python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python")));
119 #endif // defined(OS_WIN) 119 #endif // defined(OS_WIN)
120 // Launch python in unbuffered mode, so that python output doesn't mix with 120 // Launch python in unbuffered mode, so that python output doesn't mix with
121 // gtest output in buildbot log files. See http://crbug.com/147368. 121 // gtest output in buildbot log files. See http://crbug.com/147368.
122 python_cmd->AppendArg("-u"); 122 python_cmd->AppendArg("-u");
123 123
124 return true; 124 return true;
125 } 125 }
OLDNEW
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_wrapper.cc ('k') | net/test/python_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698