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