| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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"), url_security_manager_.get(), |
| 382 host_resolver_.get(), std::string(), std::string(), false, false)); | 382 host_resolver_.get(), std::string(), std::string(), false, false)); |
| 383 http_auth_handler_factory_->SetSecurityManager(url_security_manager_.get()); |
| 383 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); | 384 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); |
| 384 host_mapping_rules_.reset(new net::HostMappingRules()); | 385 host_mapping_rules_.reset(new net::HostMappingRules()); |
| 385 proxy_service_ = net::ProxyService::CreateDirectWithNetLog(&net_log_); | 386 proxy_service_ = net::ProxyService::CreateDirectWithNetLog(&net_log_); |
| 386 } | 387 } |
| 387 | 388 |
| 388 void MCSProbe::BuildNetworkSession() { | 389 void MCSProbe::BuildNetworkSession() { |
| 389 net::HttpNetworkSession::Params session_params; | 390 net::HttpNetworkSession::Params session_params; |
| 390 session_params.host_resolver = host_resolver_.get(); | 391 session_params.host_resolver = host_resolver_.get(); |
| 391 session_params.cert_verifier = cert_verifier_.get(); | 392 session_params.cert_verifier = cert_verifier_.get(); |
| 392 session_params.channel_id_service = system_channel_id_service_.get(); | 393 session_params.channel_id_service = system_channel_id_service_.get(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 491 |
| 491 return 0; | 492 return 0; |
| 492 } | 493 } |
| 493 | 494 |
| 494 } // namespace | 495 } // namespace |
| 495 } // namespace gcm | 496 } // namespace gcm |
| 496 | 497 |
| 497 int main(int argc, char* argv[]) { | 498 int main(int argc, char* argv[]) { |
| 498 return gcm::MCSProbeMain(argc, argv); | 499 return gcm::MCSProbeMain(argc, argv); |
| 499 } | 500 } |
| OLD | NEW |