Chromium Code Reviews| Index: chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h |
| diff --git a/chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h b/chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cb4f2302af0cf6fe6830b3b132eb4db38023daa3 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2016 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_AUTH_ARC_AUTH_CODE_FETCHER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_AUTH_CODE_FETCHER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/callback.h" |
| + |
| +namespace arc { |
| + |
| +// Interface to implement auth_code fetching. |
| +class ArcAuthCodeFetcher { |
| + public: |
| + virtual ~ArcAuthCodeFetcher() = default; |
| + |
| + // Fetches the |auth_code|. On success, |callback| is called with the |
| + // fetched |auth_code|. Otherwise, |callback| is called with empty string. |
| + using FetchCallback = base::Callback<void(const std::string& auth_code)>; |
| + virtual void Fetch(const FetchCallback& callback) = 0; |
|
Luis Héctor Chávez
2016/12/03 01:27:54
Maybe mention that it's not legal to call Fetch()
hidehiko
2016/12/05 06:00:31
Done.
|
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_AUTH_CODE_FETCHER_H_ |