Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_auth_service_impl.h |
| diff --git a/chrome/browser/chromeos/arc/arc_auth_service_impl.h b/chrome/browser/chromeos/arc/arc_auth_service_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..35da8654306345711cc8de827c31cbbb6a0c45a1 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/arc_auth_service_impl.h |
| @@ -0,0 +1,44 @@ |
| +// 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. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_IMPL_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_IMPL_H_ |
| + |
| +#include "base/macros.h" |
| +#include "components/arc/arc_bridge_service.h" |
| +#include "components/arc/auth/arc_auth_service.h" |
| +#include "components/arc/common/auth.mojom.h" |
| +#include "mojo/public/cpp/bindings/binding.h" |
| + |
| +namespace arc { |
| + |
| +// This class proxies the request from the client to fetch an auth code from |
| +// LSO. |
| +class ArcAuthServiceImpl : public ArcAuthService, |
| + public AuthHost, |
| + public ArcBridgeService::Observer { |
| + public: |
| + ArcAuthServiceImpl(); |
| + virtual ~ArcAuthServiceImpl(); |
|
achuithb
2016/01/04 23:41:59
use override
victorhsieh
2016/01/05 00:39:14
Should I override a destructor?
achuithb
2016/01/05 01:24:53
Yes
|
| + |
| + // Overrides ArcBridgeService::Observer |
|
achuithb
2016/01/04 23:41:59
Make everything below private. period at the end o
victorhsieh
2016/01/05 00:39:14
Done.
|
| + void OnAuthInstanceReady() override; |
| + |
| + // Overrides AuthHost |
|
achuithb
2016/01/04 23:41:59
period
victorhsieh
2016/01/05 00:39:14
Done.
|
| + void GetAuthCode(const GetAuthCodeCallback& callback) override; |
| + |
| + // Overrides ArcAuthService |
| + // Starts listening to state changes of the ArcBridgeService. |
| + // This must be called before the bridge service starts bootstrapping. |
| + void StartObservingBridgeServiceChanges(); |
| + |
| + private: |
| + mojo::Binding<AuthHost> binding_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcAuthServiceImpl); |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_SERVICE_IMPL_H_ |