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

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

Issue 6404003: Silence testserver logs when tests are run in non-verbose mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Take 2. Use GetMinLogLevel instead of a separate flag. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/tools/testserver/testserver.py » ('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/test_server.h" 5 #include "net/test/test_server.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 341 }
342 342
343 bool TestServer::AddCommandLineArguments(CommandLine* command_line) const { 343 bool TestServer::AddCommandLineArguments(CommandLine* command_line) const {
344 command_line->AppendSwitchASCII("port", 344 command_line->AppendSwitchASCII("port",
345 base::IntToString(host_port_pair_.port())); 345 base::IntToString(host_port_pair_.port()));
346 command_line->AppendSwitchPath("data-dir", document_root_); 346 command_line->AppendSwitchPath("data-dir", document_root_);
347 command_line->AppendSwitchPath("policy-cert-chain", 347 command_line->AppendSwitchPath("policy-cert-chain",
348 certificates_dir_.AppendASCII("ok_cert.pem")); 348 certificates_dir_.AppendASCII("ok_cert.pem"));
349 command_line->AppendSwitchPath("policy-cert-chain", GetRootCertificatePath()); 349 command_line->AppendSwitchPath("policy-cert-chain", GetRootCertificatePath());
350 350
351 if (logging::GetMinLogLevel() == logging::LOG_VERBOSE) {
352 command_line->AppendArg("--log-to-console");
353 }
354
351 if (type_ == TYPE_FTP) { 355 if (type_ == TYPE_FTP) {
352 command_line->AppendArg("-f"); 356 command_line->AppendArg("-f");
353 } else if (type_ == TYPE_SYNC) { 357 } else if (type_ == TYPE_SYNC) {
354 command_line->AppendArg("--sync"); 358 command_line->AppendArg("--sync");
355 } else if (type_ == TYPE_HTTPS) { 359 } else if (type_ == TYPE_HTTPS) {
356 FilePath certificate_path(certificates_dir_); 360 FilePath certificate_path(certificates_dir_);
357 certificate_path = certificate_path.Append( 361 certificate_path = certificate_path.Append(
358 https_options_.GetCertificateFile()); 362 https_options_.GetCertificateFile());
359 if (!file_util::PathExists(certificate_path)) { 363 if (!file_util::PathExists(certificate_path)) {
360 LOG(ERROR) << "Certificate path " << certificate_path.value() 364 LOG(ERROR) << "Certificate path " << certificate_path.value()
(...skipping 25 matching lines...) Expand all
386 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256) 390 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_AES256)
387 command_line->AppendSwitchASCII(kBulkCipherSwitch, "aes256"); 391 command_line->AppendSwitchASCII(kBulkCipherSwitch, "aes256");
388 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES) 392 if (https_options_.bulk_ciphers & HTTPSOptions::BULK_CIPHER_3DES)
389 command_line->AppendSwitchASCII(kBulkCipherSwitch, "3des"); 393 command_line->AppendSwitchASCII(kBulkCipherSwitch, "3des");
390 } 394 }
391 395
392 return true; 396 return true;
393 } 397 }
394 398
395 } // namespace net 399 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698