Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: blimp/client/session/blimp_client_session.cc

Issue 1979273003: Added logs when contacting Blimp assigner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 io_thread_.task_runner()->PostTask( 184 io_thread_.task_runner()->PostTask(
185 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, 185 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize,
186 base::Unretained(net_components_.get()))); 186 base::Unretained(net_components_.get())));
187 } 187 }
188 188
189 BlimpClientSession::~BlimpClientSession() { 189 BlimpClientSession::~BlimpClientSession() {
190 io_thread_.task_runner()->DeleteSoon(FROM_HERE, net_components_.release()); 190 io_thread_.task_runner()->DeleteSoon(FROM_HERE, net_components_.release());
191 } 191 }
192 192
193 void BlimpClientSession::Connect(const std::string& client_auth_token) { 193 void BlimpClientSession::Connect(const std::string& client_auth_token) {
194 VLOG(1) << "Trying to get assignment.";
194 assignment_source_->GetAssignment( 195 assignment_source_->GetAssignment(
195 client_auth_token, base::Bind(&BlimpClientSession::ConnectWithAssignment, 196 client_auth_token, base::Bind(&BlimpClientSession::ConnectWithAssignment,
196 weak_factory_.GetWeakPtr())); 197 weak_factory_.GetWeakPtr()));
197 } 198 }
198 199
199 void BlimpClientSession::ConnectWithAssignment(AssignmentSource::Result result, 200 void BlimpClientSession::ConnectWithAssignment(AssignmentSource::Result result,
200 const Assignment& assignment) { 201 const Assignment& assignment) {
201 OnAssignmentConnectionAttempted(result, assignment); 202 OnAssignmentConnectionAttempted(result, assignment);
202 203
203 if (result != AssignmentSource::Result::RESULT_OK) { 204 if (result != AssignmentSource::Result::RESULT_OK) {
204 VLOG(1) << "Assignment request failed: " << result; 205 LOG(FATAL) << "Assignment failed, reason: " << result;
205 return; 206 return;
206 } 207 }
207 208
209 VLOG(1) << "Assignment succeeded";
Kevin M 2016/05/16 17:56:32 Add detail for the fields of |assignment|?
shaktisahu 2016/05/16 18:10:29 We are logging that in the next function (ClientNe
210
208 io_thread_.task_runner()->PostTask( 211 io_thread_.task_runner()->PostTask(
209 FROM_HERE, 212 FROM_HERE,
210 base::Bind(&ClientNetworkComponents::ConnectWithAssignment, 213 base::Bind(&ClientNetworkComponents::ConnectWithAssignment,
211 base::Unretained(net_components_.get()), assignment)); 214 base::Unretained(net_components_.get()), assignment));
212 } 215 }
213 216
214 void BlimpClientSession::OnAssignmentConnectionAttempted( 217 void BlimpClientSession::OnAssignmentConnectionAttempted(
215 AssignmentSource::Result result, 218 AssignmentSource::Result result,
216 const Assignment& assignment) {} 219 const Assignment& assignment) {}
217 220
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const { 273 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const {
271 return render_widget_feature_.get(); 274 return render_widget_feature_.get();
272 } 275 }
273 276
274 SettingsFeature* BlimpClientSession::GetSettingsFeature() const { 277 SettingsFeature* BlimpClientSession::GetSettingsFeature() const {
275 return settings_feature_.get(); 278 return settings_feature_.get();
276 } 279 }
277 280
278 } // namespace client 281 } // namespace client
279 } // namespace blimp 282 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698