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

Side by Side Diff: blimp/client/app/linux/blimp_client_context_delegate_linux.cc

Issue 2363153002: Migrate Linux Blimp client to use BlimpClientContext (Closed)
Patch Set: Fix more nits Created 4 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/memory/ptr_util.h"
6 #include "blimp/client/app/linux/blimp_client_context_delegate_linux.h"
7 #include "blimp/client/support/session/blimp_default_identity_provider.h"
8
9 namespace blimp {
10 namespace client {
11
12 BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux() = default;
13
14 BlimpClientContextDelegateLinux::~BlimpClientContextDelegateLinux() = default;
15
16 void BlimpClientContextDelegateLinux::AttachBlimpContentsHelpers(
17 BlimpContents* blimp_contents) {}
18
19 void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted(
20 AssignmentRequestResult result,
21 const Assignment& assignment) {
22 switch (result) {
23 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_UNKNOWN:
24 VLOG(0) << "Assignment connection attempt result unknown";
Kevin M 2016/09/27 21:59:40 These should probably be LOG(INFO|ERROR) or DLOG()
Kevin M 2016/09/27 21:59:41 "Connection" isn't a good term here and elsewhere.
steimel 2016/09/27 23:23:19 Done.
25 break;
26 case AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OK:
Kevin M 2016/09/27 21:59:40 Move success case to the top.
steimel 2016/09/27 23:23:19 Done.
27 VLOG(0) << "Assignment connection success";
28 break;
29 default:
Kevin M 2016/09/27 21:59:40 Don't use "default" if you can avoid it - this let
steimel 2016/09/27 23:23:19 Done.
30 VLOG(0) << "Assignment connection error: " << result;
31 break;
32 }
33 }
34
35 std::unique_ptr<IdentityProvider>
36 BlimpClientContextDelegateLinux::CreateIdentityProvider() {
37 return base::MakeUnique<BlimpDefaultIdentityProvider>();
38 }
39
40 void BlimpClientContextDelegateLinux::OnAuthenticationError(
41 BlimpClientContextDelegate::AuthError error) {
42 switch (error) {
43 case BlimpClientContextDelegate::AuthError::NOT_SIGNED_IN:
44 VLOG(0) << "Error: Not signed in";
Kevin M 2016/09/27 21:59:41 LOG(ERROR)
steimel 2016/09/27 23:23:19 Done.
45 break;
46 case BlimpClientContextDelegate::AuthError::OAUTH_TOKEN_FAIL:
47 VLOG(0) << "Error: OAuth token failure";
48 break;
49 }
50 }
51
52 } // namespace client
53 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698