OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/local_test_server.h" | 5 #include "net/test/local_test_server.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 << "Testserver features that rely on it will not work"; | 183 << "Testserver features that rely on it will not work"; |
184 return true; | 184 return true; |
185 } | 185 } |
186 | 186 |
187 AppendToPythonPath(pyproto_dir); | 187 AppendToPythonPath(pyproto_dir); |
188 AppendToPythonPath(pyproto_dir.AppendASCII("sync").AppendASCII("protocol")); | 188 AppendToPythonPath(pyproto_dir.AppendASCII("sync").AppendASCII("protocol")); |
189 AppendToPythonPath(pyproto_dir.AppendASCII("chrome") | 189 AppendToPythonPath(pyproto_dir.AppendASCII("chrome") |
190 .AppendASCII("browser") | 190 .AppendASCII("browser") |
191 .AppendASCII("policy") | 191 .AppendASCII("policy") |
192 .AppendASCII("proto")); | 192 .AppendASCII("proto")); |
193 AppendToPythonPath(pyproto_dir.AppendASCII("google")); | |
Paweł Hajdan Jr.
2012/04/17 06:38:05
nit: Move it above "sync/protocol" if possible. Ot
mattm
2012/04/18 00:20:00
Done.
| |
193 | 194 |
194 return true; | 195 return true; |
195 } | 196 } |
196 | 197 |
197 bool LocalTestServer::AddCommandLineArguments(CommandLine* command_line) const { | 198 bool LocalTestServer::AddCommandLineArguments(CommandLine* command_line) const { |
198 base::DictionaryValue arguments_dict; | 199 base::DictionaryValue arguments_dict; |
199 if (!GenerateArguments(&arguments_dict)) | 200 if (!GenerateArguments(&arguments_dict)) |
200 return false; | 201 return false; |
201 | 202 |
202 // Serialize the argument dictionary into CommandLine. | 203 // Serialize the argument dictionary into CommandLine. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 case TYPE_TCP_ECHO: | 236 case TYPE_TCP_ECHO: |
236 command_line->AppendArg("--tcp-echo"); | 237 command_line->AppendArg("--tcp-echo"); |
237 break; | 238 break; |
238 case TYPE_UDP_ECHO: | 239 case TYPE_UDP_ECHO: |
239 command_line->AppendArg("--udp-echo"); | 240 command_line->AppendArg("--udp-echo"); |
240 break; | 241 break; |
241 case TYPE_GDATA: | 242 case TYPE_GDATA: |
242 command_line->AppendArg( | 243 command_line->AppendArg( |
243 std::string("--auth-token") + "=" + BaseTestServer::kGDataAuthToken); | 244 std::string("--auth-token") + "=" + BaseTestServer::kGDataAuthToken); |
244 break; | 245 break; |
246 case TYPE_SAFEBROWSING: | |
247 command_line->AppendArg("--safebrowsing"); | |
248 break; | |
245 default: | 249 default: |
246 NOTREACHED(); | 250 NOTREACHED(); |
247 return false; | 251 return false; |
248 } | 252 } |
249 | 253 |
250 return true; | 254 return true; |
251 } | 255 } |
252 | 256 |
253 } // namespace net | 257 } // namespace net |
OLD | NEW |