Index: chrome/browser/chromeos/arc/arc_auth_service_impl.cc |
diff --git a/chrome/browser/chromeos/arc/arc_auth_service_impl.cc b/chrome/browser/chromeos/arc/arc_auth_service_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f8f9852ca8c4de17d7050bd908ab1785d0ba2cef |
--- /dev/null |
+++ b/chrome/browser/chromeos/arc/arc_auth_service_impl.cc |
@@ -0,0 +1,33 @@ |
+// 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_impl.h" |
+ |
+#include <utility> |
+ |
+namespace arc { |
+ |
+ArcAuthServiceImpl::ArcAuthServiceImpl() : binding_(this) { |
+} |
+ |
+ArcAuthServiceImpl::~ArcAuthServiceImpl() { |
+ ArcBridgeService::Get()->RemoveObserver(this); |
+} |
+ |
+void ArcAuthServiceImpl::StartObservingBridgeServiceChanges() { |
+ ArcBridgeService::Get()->AddObserver(this); |
+} |
+ |
+void ArcAuthServiceImpl::OnAuthInstanceReady() { |
+ arc::AuthHostPtr host; |
+ binding_.Bind(GetProxy(&host)); |
+ ArcBridgeService::Get()->auth_instance()->Init(std::move(host)); |
+} |
+ |
+void ArcAuthServiceImpl::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 |