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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_auth_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5068550da19750ab584f498922c639929b9fd906
--- /dev/null
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
+
+#include <utility>
+
+namespace arc {
+
+ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service)
+ : ArcService(bridge_service), binding_(this) {
+ arc_bridge_service()->AddObserver(this);
+}
+
+ArcAuthService::~ArcAuthService() {
+ arc_bridge_service()->RemoveObserver(this);
+}
+
+void ArcAuthService::OnAuthInstanceReady() {
+ arc::AuthHostPtr host;
+ binding_.Bind(GetProxy(&host));
+ arc_bridge_service()->auth_instance()->Init(std::move(host));
+}
+
+void ArcAuthService::GetAuthCode(const GetAuthCodeCallback& callback) {
+ // TODO(victorhsieh): request auth code from LSO (crbug.com/571146).
+ callback.Run(mojo::String("fake auth code from ArcAuthService in Chrome"));
+}
+
+} // namespace arc
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_auth_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698