| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <cstddef> | 10 #include <cstddef> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 << " Message send status: " << status; | 139 << " Message send status: " << status; |
| 140 } | 140 } |
| 141 | 141 |
| 142 // Needed to use a real host resolver. | 142 // Needed to use a real host resolver. |
| 143 class MyTestURLRequestContext : public net::TestURLRequestContext { | 143 class MyTestURLRequestContext : public net::TestURLRequestContext { |
| 144 public: | 144 public: |
| 145 MyTestURLRequestContext() : TestURLRequestContext(true) { | 145 MyTestURLRequestContext() : TestURLRequestContext(true) { |
| 146 context_storage_.set_host_resolver( | 146 context_storage_.set_host_resolver( |
| 147 net::HostResolver::CreateDefaultResolver(NULL)); | 147 net::HostResolver::CreateDefaultResolver(NULL)); |
| 148 context_storage_.set_transport_security_state( | 148 context_storage_.set_transport_security_state( |
| 149 base::WrapUnique(new net::TransportSecurityState())); | 149 base::MakeUnique<net::TransportSecurityState>()); |
| 150 Init(); | 150 Init(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 ~MyTestURLRequestContext() override {} | 153 ~MyTestURLRequestContext() override {} |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { | 156 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { |
| 157 public: | 157 public: |
| 158 explicit MyTestURLRequestContextGetter( | 158 explicit MyTestURLRequestContextGetter( |
| 159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) | 159 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 | 516 |
| 517 return 0; | 517 return 0; |
| 518 } | 518 } |
| 519 | 519 |
| 520 } // namespace | 520 } // namespace |
| 521 } // namespace gcm | 521 } // namespace gcm |
| 522 | 522 |
| 523 int main(int argc, char* argv[]) { | 523 int main(int argc, char* argv[]) { |
| 524 return gcm::MCSProbeMain(argc, argv); | 524 return gcm::MCSProbeMain(argc, argv); |
| 525 } | 525 } |
| OLD | NEW |