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

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

Issue 1084533002: Rename NetLogLogger and CapturingNetLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename NetLogLogger and CapturingNetLog(removed compiler error for chromeOS) 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/cast_channel/cast_transport_unittest.cc ('k') | net/BUILD.gn » ('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 22 matching lines...) Expand all
33 #include "google_apis/gcm/engine/gservices_settings.h" 33 #include "google_apis/gcm/engine/gservices_settings.h"
34 #include "google_apis/gcm/engine/mcs_client.h" 34 #include "google_apis/gcm/engine/mcs_client.h"
35 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h" 35 #include "google_apis/gcm/monitoring/fake_gcm_stats_recorder.h"
36 #include "net/base/host_mapping_rules.h" 36 #include "net/base/host_mapping_rules.h"
37 #include "net/cert/cert_verifier.h" 37 #include "net/cert/cert_verifier.h"
38 #include "net/dns/host_resolver.h" 38 #include "net/dns/host_resolver.h"
39 #include "net/http/http_auth_handler_factory.h" 39 #include "net/http/http_auth_handler_factory.h"
40 #include "net/http/http_network_session.h" 40 #include "net/http/http_network_session.h"
41 #include "net/http/http_server_properties_impl.h" 41 #include "net/http/http_server_properties_impl.h"
42 #include "net/http/transport_security_state.h" 42 #include "net/http/transport_security_state.h"
43 #include "net/log/net_log_logger.h" 43 #include "net/log/write_to_file_net_log_observer.h"
44 #include "net/socket/client_socket_factory.h" 44 #include "net/socket/client_socket_factory.h"
45 #include "net/socket/ssl_client_socket.h" 45 #include "net/socket/ssl_client_socket.h"
46 #include "net/ssl/channel_id_service.h" 46 #include "net/ssl/channel_id_service.h"
47 #include "net/ssl/default_channel_id_store.h" 47 #include "net/ssl/default_channel_id_store.h"
48 #include "net/url_request/url_request_test_util.h" 48 #include "net/url_request/url_request_test_util.h"
49 49
50 #if defined(OS_MACOSX) 50 #if defined(OS_MACOSX)
51 #include "base/mac/scoped_nsautorelease_pool.h" 51 #include "base/mac/scoped_nsautorelease_pool.h"
52 #endif 52 #endif
53 53
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 base::FilePath gcm_store_path_; 216 base::FilePath gcm_store_path_;
217 uint64 android_id_; 217 uint64 android_id_;
218 uint64 secret_; 218 uint64 secret_;
219 std::string server_host_; 219 std::string server_host_;
220 int server_port_; 220 int server_port_;
221 221
222 // Network state. 222 // Network state.
223 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 223 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
224 net::NetLog net_log_; 224 net::NetLog net_log_;
225 scoped_ptr<net::NetLogLogger> logger_; 225 scoped_ptr<net::WriteToFileNetLogObserver> logger_;
226 scoped_ptr<net::HostResolver> host_resolver_; 226 scoped_ptr<net::HostResolver> host_resolver_;
227 scoped_ptr<net::CertVerifier> cert_verifier_; 227 scoped_ptr<net::CertVerifier> cert_verifier_;
228 scoped_ptr<net::ChannelIDService> system_channel_id_service_; 228 scoped_ptr<net::ChannelIDService> system_channel_id_service_;
229 scoped_ptr<net::TransportSecurityState> transport_security_state_; 229 scoped_ptr<net::TransportSecurityState> transport_security_state_;
230 scoped_ptr<net::URLSecurityManager> url_security_manager_; 230 scoped_ptr<net::URLSecurityManager> url_security_manager_;
231 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory_; 231 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory_;
232 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_; 232 scoped_ptr<net::HttpServerPropertiesImpl> http_server_properties_;
233 scoped_ptr<net::HostMappingRules> host_mapping_rules_; 233 scoped_ptr<net::HostMappingRules> host_mapping_rules_;
234 scoped_refptr<net::HttpNetworkSession> network_session_; 234 scoped_refptr<net::HttpNetworkSession> network_session_;
235 scoped_ptr<net::ProxyService> proxy_service_; 235 scoped_ptr<net::ProxyService> proxy_service_;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 base::ScopedFILE log_file; 351 base::ScopedFILE log_file;
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::NetLogLogger()); 361 logger_.reset(new net::WriteToFileNetLogObserver());
362 logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES); 362 logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES);
363 logger_->StartObserving(&net_log_, log_file.Pass(), nullptr, nullptr); 363 logger_->StartObserving(&net_log_, log_file.Pass(), nullptr, nullptr);
364 } 364 }
365 365
366 host_resolver_ = net::HostResolver::CreateDefaultResolver(&net_log_); 366 host_resolver_ = net::HostResolver::CreateDefaultResolver(&net_log_);
367 367
368 if (command_line_.HasSwitch(kIgnoreCertSwitch)) { 368 if (command_line_.HasSwitch(kIgnoreCertSwitch)) {
369 cert_verifier_.reset(new MyTestCertVerifier()); 369 cert_verifier_.reset(new MyTestCertVerifier());
370 } else { 370 } else {
371 cert_verifier_.reset(net::CertVerifier::CreateDefault()); 371 cert_verifier_.reset(net::CertVerifier::CreateDefault());
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 return 0; 496 return 0;
497 } 497 }
498 498
499 } // namespace 499 } // namespace
500 } // namespace gcm 500 } // namespace gcm
501 501
502 int main(int argc, char* argv[]) { 502 int main(int argc, char* argv[]) {
503 return gcm::MCSProbeMain(argc, argv); 503 return gcm::MCSProbeMain(argc, argv);
504 } 504 }
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_transport_unittest.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698