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

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

Issue 1596663002: arc-bridge: Introduce the ArcService class (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased + protected ArcService direct instantiation 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/arc/arc_auth_service_impl.h"
6
7 #include <utility>
8
9 namespace arc {
10
11 ArcAuthServiceImpl::ArcAuthServiceImpl() : binding_(this) {}
12
13 ArcAuthServiceImpl::~ArcAuthServiceImpl() {
14 ArcBridgeService::Get()->RemoveObserver(this);
15 }
16
17 void ArcAuthServiceImpl::StartObservingBridgeServiceChanges() {
18 ArcBridgeService::Get()->AddObserver(this);
19 }
20
21 void ArcAuthServiceImpl::OnAuthInstanceReady() {
22 arc::AuthHostPtr host;
23 binding_.Bind(GetProxy(&host));
24 ArcBridgeService::Get()->auth_instance()->Init(std::move(host));
25 }
26
27 void ArcAuthServiceImpl::GetAuthCode(const GetAuthCodeCallback& callback) {
28 // TODO(victorhsieh): request auth code from LSO (crbug.com/571146).
29 callback.Run(mojo::String("fake auth code from ArcAuthService in Chrome"));
30 }
31
32 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service_impl.h ('k') | chrome/browser/chromeos/arc/arc_intent_helper_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698