| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/core/context/blimp_client_context_impl.h" | 5 #include "blimp/client/core/context/blimp_client_context_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 void BlimpClientContextImpl::ConnectWithAssignment( | 181 void BlimpClientContextImpl::ConnectWithAssignment( |
| 182 const Assignment& assignment) { | 182 const Assignment& assignment) { |
| 183 io_thread_task_runner_->PostTask( | 183 io_thread_task_runner_->PostTask( |
| 184 FROM_HERE, | 184 FROM_HERE, |
| 185 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, | 185 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, |
| 186 base::Unretained(net_components_.get()), assignment)); | 186 base::Unretained(net_components_.get()), assignment)); |
| 187 } | 187 } |
| 188 | 188 |
| 189 std::unordered_map<std::string, std::string> | 189 std::unordered_map<std::string, std::string> |
| 190 BlimpClientContextImpl::CreateFeedbackData() { | 190 BlimpClientContextImpl::CreateFeedbackData() { |
| 191 return CreateBlimpFeedbackData(blimp_contents_manager_.get()); | 191 IdentitySource* identity_source = GetIdentitySource(); |
| 192 DCHECK(identity_source); |
| 193 return CreateBlimpFeedbackData(blimp_contents_manager_.get(), |
| 194 identity_source->GetActiveUsername()); |
| 192 } | 195 } |
| 193 | 196 |
| 194 IdentitySource* BlimpClientContextImpl::GetIdentitySource() { | 197 IdentitySource* BlimpClientContextImpl::GetIdentitySource() { |
| 195 DCHECK(assignment_fetcher_); | 198 DCHECK(assignment_fetcher_); |
| 196 return assignment_fetcher_->GetIdentitySource(); | 199 return assignment_fetcher_->GetIdentitySource(); |
| 197 } | 200 } |
| 198 | 201 |
| 199 ConnectionStatus* BlimpClientContextImpl::GetConnectionStatus() { | 202 ConnectionStatus* BlimpClientContextImpl::GetConnectionStatus() { |
| 200 return &connection_status_; | 203 return &connection_status_; |
| 201 } | 204 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 if (result >= 0) { | 278 if (result >= 0) { |
| 276 delegate_->OnEngineDisconnected(result); | 279 delegate_->OnEngineDisconnected(result); |
| 277 } else { | 280 } else { |
| 278 delegate_->OnNetworkDisconnected(result); | 281 delegate_->OnNetworkDisconnected(result); |
| 279 } | 282 } |
| 280 } | 283 } |
| 281 } | 284 } |
| 282 | 285 |
| 283 } // namespace client | 286 } // namespace client |
| 284 } // namespace blimp | 287 } // namespace blimp |
| OLD | NEW |