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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 11 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 | chrome/browser/chromeos/arc/arc_intent_helper_bridge.cc » ('j') | 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 "chrome/browser/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace arc { 9 namespace arc {
10 10
11 ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service) 11 ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service)
12 : ArcService(bridge_service), binding_(this) { 12 : ArcService(bridge_service), binding_(this) {
13 arc_bridge_service()->AddObserver(this); 13 arc_bridge_service()->AddObserver(this);
14 } 14 }
15 15
16 ArcAuthService::~ArcAuthService() { 16 ArcAuthService::~ArcAuthService() {
17 arc_bridge_service()->RemoveObserver(this); 17 arc_bridge_service()->RemoveObserver(this);
18 } 18 }
19 19
20 void ArcAuthService::OnAuthInstanceReady() { 20 void ArcAuthService::OnAuthInstanceReady() {
21 arc::AuthHostPtr host; 21 arc_bridge_service()->auth_instance()->Init(
22 binding_.Bind(GetProxy(&host)); 22 binding_.CreateInterfacePtrAndBind());
23 arc_bridge_service()->auth_instance()->Init(std::move(host));
24 } 23 }
25 24
26 void ArcAuthService::GetAuthCode(const GetAuthCodeCallback& callback) { 25 void ArcAuthService::GetAuthCode(const GetAuthCodeCallback& callback) {
27 // TODO(victorhsieh): request auth code from LSO (crbug.com/571146). 26 // TODO(victorhsieh): request auth code from LSO (crbug.com/571146).
28 callback.Run(mojo::String("fake auth code from ArcAuthService in Chrome")); 27 callback.Run(mojo::String("fake auth code from ArcAuthService in Chrome"));
29 } 28 }
30 29
31 } // namespace arc 30 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_intent_helper_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698