OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // A standalone tool for testing MCS connections and the MCS client on their | 5 // A standalone tool for testing MCS connections and the MCS client on their |
6 // own. | 6 // own. |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <cstdio> | 9 #include <cstdio> |
10 #include <string> | 10 #include <string> |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 if (command_line_.HasSwitch(kLogFileSwitch)) { | 352 if (command_line_.HasSwitch(kLogFileSwitch)) { |
353 base::FilePath log_path = command_line_.GetSwitchValuePath(kLogFileSwitch); | 353 base::FilePath log_path = command_line_.GetSwitchValuePath(kLogFileSwitch); |
354 #if defined(OS_WIN) | 354 #if defined(OS_WIN) |
355 log_file.reset(_wfopen(log_path.value().c_str(), L"w")); | 355 log_file.reset(_wfopen(log_path.value().c_str(), L"w")); |
356 #elif defined(OS_POSIX) | 356 #elif defined(OS_POSIX) |
357 log_file.reset(fopen(log_path.value().c_str(), "w")); | 357 log_file.reset(fopen(log_path.value().c_str(), "w")); |
358 #endif | 358 #endif |
359 } | 359 } |
360 if (log_file.get()) { | 360 if (log_file.get()) { |
361 logger_.reset(new net::WriteToFileNetLogObserver()); | 361 logger_.reset(new net::WriteToFileNetLogObserver()); |
362 logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES); | 362 logger_->set_capture_mode( |
| 363 net::NetLogCaptureMode::IncludeCookiesAndCredentials()); |
363 logger_->StartObserving(&net_log_, log_file.Pass(), nullptr, nullptr); | 364 logger_->StartObserving(&net_log_, log_file.Pass(), nullptr, nullptr); |
364 } | 365 } |
365 | 366 |
366 host_resolver_ = net::HostResolver::CreateDefaultResolver(&net_log_); | 367 host_resolver_ = net::HostResolver::CreateDefaultResolver(&net_log_); |
367 | 368 |
368 if (command_line_.HasSwitch(kIgnoreCertSwitch)) { | 369 if (command_line_.HasSwitch(kIgnoreCertSwitch)) { |
369 cert_verifier_.reset(new MyTestCertVerifier()); | 370 cert_verifier_.reset(new MyTestCertVerifier()); |
370 } else { | 371 } else { |
371 cert_verifier_.reset(net::CertVerifier::CreateDefault()); | 372 cert_verifier_.reset(net::CertVerifier::CreateDefault()); |
372 } | 373 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 496 |
496 return 0; | 497 return 0; |
497 } | 498 } |
498 | 499 |
499 } // namespace | 500 } // namespace |
500 } // namespace gcm | 501 } // namespace gcm |
501 | 502 |
502 int main(int argc, char* argv[]) { | 503 int main(int argc, char* argv[]) { |
503 return gcm::MCSProbeMain(argc, argv); | 504 return gcm::MCSProbeMain(argc, argv); |
504 } | 505 } |
OLD | NEW |