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

Side by Side Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 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
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.cc ('k') | net/base/address_list.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 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
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
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 }
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.cc ('k') | net/base/address_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698