| 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/client/session/blimp_client_session.h" | 5 #include "blimp/client/session/blimp_client_session.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 assignment_source_->GetAssignment( | 207 assignment_source_->GetAssignment( |
| 208 client_auth_token, base::Bind(&BlimpClientSession::ConnectWithAssignment, | 208 client_auth_token, base::Bind(&BlimpClientSession::ConnectWithAssignment, |
| 209 weak_factory_.GetWeakPtr())); | 209 weak_factory_.GetWeakPtr())); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void BlimpClientSession::ConnectWithAssignment(AssignmentSource::Result result, | 212 void BlimpClientSession::ConnectWithAssignment(AssignmentSource::Result result, |
| 213 const Assignment& assignment) { | 213 const Assignment& assignment) { |
| 214 OnAssignmentConnectionAttempted(result, assignment); | 214 OnAssignmentConnectionAttempted(result, assignment); |
| 215 | 215 |
| 216 if (result != AssignmentSource::Result::RESULT_OK) { | 216 if (result != AssignmentSource::Result::RESULT_OK) { |
| 217 LOG(FATAL) << "Assignment failed, reason: " << result; | 217 LOG(ERROR) << "Assignment failed, reason: " << result; |
| 218 return; | 218 return; |
| 219 } | 219 } |
| 220 | 220 |
| 221 VLOG(1) << "Assignment succeeded"; | 221 VLOG(1) << "Assignment succeeded"; |
| 222 | 222 |
| 223 io_thread_.task_runner()->PostTask( | 223 io_thread_.task_runner()->PostTask( |
| 224 FROM_HERE, | 224 FROM_HERE, |
| 225 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, | 225 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, |
| 226 base::Unretained(net_components_.get()), assignment)); | 226 base::Unretained(net_components_.get()), assignment)); |
| 227 } | 227 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return settings_feature_.get(); | 290 return settings_feature_.get(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 BlimpConnectionStatistics* BlimpClientSession::GetBlimpConnectionStatistics() | 293 BlimpConnectionStatistics* BlimpClientSession::GetBlimpConnectionStatistics() |
| 294 const { | 294 const { |
| 295 return blimp_connection_statistics_; | 295 return blimp_connection_statistics_; |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace client | 298 } // namespace client |
| 299 } // namespace blimp | 299 } // namespace blimp |
| OLD | NEW |