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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } else { | 369 } else { |
370 cert_verifier_.reset(net::CertVerifier::CreateDefault()); | 370 cert_verifier_.reset(net::CertVerifier::CreateDefault()); |
371 } | 371 } |
372 system_channel_id_service_.reset( | 372 system_channel_id_service_.reset( |
373 new net::ChannelIDService( | 373 new net::ChannelIDService( |
374 new net::DefaultChannelIDStore(NULL), | 374 new net::DefaultChannelIDStore(NULL), |
375 base::WorkerPool::GetTaskRunner(true))); | 375 base::WorkerPool::GetTaskRunner(true))); |
376 | 376 |
377 transport_security_state_.reset(new net::TransportSecurityState()); | 377 transport_security_state_.reset(new net::TransportSecurityState()); |
378 url_security_manager_.reset(net::URLSecurityManager::Create(NULL, NULL)); | 378 url_security_manager_.reset(net::URLSecurityManager::Create(NULL, NULL)); |
379 http_auth_handler_factory_.reset( | 379 http_auth_handler_factory_.reset(net::HttpAuthHandlerRegistryFactory::Create( |
380 net::HttpAuthHandlerRegistryFactory::Create( | 380 std::vector<std::string>(1, "basic"), url_security_manager_.get(), |
381 std::vector<std::string>(1, "basic"), | 381 host_resolver_.get(), std::string(), std::string(), false, false)); |
382 url_security_manager_.get(), | |
383 host_resolver_.get(), | |
384 std::string(), | |
385 false, | |
386 false)); | |
387 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); | 382 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); |
388 host_mapping_rules_.reset(new net::HostMappingRules()); | 383 host_mapping_rules_.reset(new net::HostMappingRules()); |
389 proxy_service_.reset(net::ProxyService::CreateDirectWithNetLog(&net_log_)); | 384 proxy_service_.reset(net::ProxyService::CreateDirectWithNetLog(&net_log_)); |
390 } | 385 } |
391 | 386 |
392 void MCSProbe::BuildNetworkSession() { | 387 void MCSProbe::BuildNetworkSession() { |
393 net::HttpNetworkSession::Params session_params; | 388 net::HttpNetworkSession::Params session_params; |
394 session_params.host_resolver = host_resolver_.get(); | 389 session_params.host_resolver = host_resolver_.get(); |
395 session_params.cert_verifier = cert_verifier_.get(); | 390 session_params.cert_verifier = cert_verifier_.get(); |
396 session_params.channel_id_service = system_channel_id_service_.get(); | 391 session_params.channel_id_service = system_channel_id_service_.get(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 489 |
495 return 0; | 490 return 0; |
496 } | 491 } |
497 | 492 |
498 } // namespace | 493 } // namespace |
499 } // namespace gcm | 494 } // namespace gcm |
500 | 495 |
501 int main(int argc, char* argv[]) { | 496 int main(int argc, char* argv[]) { |
502 return gcm::MCSProbeMain(argc, argv); | 497 return gcm::MCSProbeMain(argc, argv); |
503 } | 498 } |
OLD | NEW |