| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "blimp/net/engine_connection_manager.h" | 5 #include "blimp/net/engine_connection_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 Connect(); | 47 Connect(); |
| 48 transport_->GetLocalAddress(ip_endpoint); | 48 transport_->GetLocalAddress(ip_endpoint); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void EngineConnectionManager::Connect() { | 51 void EngineConnectionManager::Connect() { |
| 52 transport_->Connect(base::Bind(&EngineConnectionManager::OnConnectResult, | 52 transport_->Connect(base::Bind(&EngineConnectionManager::OnConnectResult, |
| 53 base::Unretained(this))); | 53 base::Unretained(this))); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void EngineConnectionManager::OnConnectResult(int result) { | 56 void EngineConnectionManager::OnConnectResult(int result) { |
| 57 CHECK_EQ(net::OK, result) << "Transport failure:" << transport_->GetName(); | 57 // Transport failure. |
| 58 CHECK_EQ(net::OK, result); |
| 58 connection_handler_->HandleConnection(transport_->MakeConnection()); | 59 connection_handler_->HandleConnection(transport_->MakeConnection()); |
| 59 Connect(); | 60 Connect(); |
| 60 } | 61 } |
| 61 | 62 |
| 62 } // namespace blimp | 63 } // namespace blimp |
| OLD | NEW |