OLD | NEW |
---|---|
(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 namespace arc { | |
8 | |
9 ArcAuthServiceImpl::ArcAuthServiceImpl() : binding_(this) { | |
10 } | |
11 | |
12 ArcAuthServiceImpl::~ArcAuthServiceImpl() { | |
13 ArcBridgeService* bridge_service = ArcBridgeService::Get(); | |
14 DCHECK(bridge_service); | |
15 bridge_service->RemoveObserver(this); | |
16 } | |
17 | |
18 void ArcAuthServiceImpl::StartObservingBridgeServiceChanges() { | |
19 ArcBridgeService* bridge_service = ArcBridgeService::Get(); | |
20 DCHECK(bridge_service); | |
21 bridge_service->AddObserver(this); | |
22 } | |
23 | |
24 void ArcAuthServiceImpl::OnAuthInstanceReady() { | |
25 ArcBridgeService* bridge_service = ArcBridgeService::Get(); | |
26 DCHECK(bridge_service); | |
27 | |
28 arc::AuthHostPtr host; | |
29 binding_.Bind(GetProxy(&host)); | |
30 bridge_service->auth_instance()->Init(std::move(host)); | |
Luis Héctor Chávez
2016/01/04 21:26:21
#include <utility>
victorhsieh
2016/01/04 21:31:28
Done.
| |
31 } | |
32 | |
33 void ArcAuthServiceImpl::GetAuthCode(const GetAuthCodeCallback& callback) { | |
34 // TODO(victorhsieh): request auth code from LSO. | |
35 callback.Run(mojo::String("4/ICoyOWnK5PxRIV5JOcuCywr10ugN3iHt7uw88naWh8o")); | |
36 } | |
37 | |
38 } // namespace arc | |
OLD | NEW |