Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_AUTH_CODE_FETCHER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_AUTH_CODE_FETCHER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace arc { | |
| 13 | |
| 14 // Interface to implement auth_code fetching. | |
| 15 class ArcAuthCodeFetcher { | |
| 16 public: | |
| 17 virtual ~ArcAuthCodeFetcher() = default; | |
| 18 | |
| 19 // Fetches the |auth_code|. On success, |callback| is called with the | |
| 20 // fetched |auth_code|. Otherwise, |callback| is called with empty string. | |
| 21 using FetchCallback = base::Callback<void(const std::string& auth_code)>; | |
| 22 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.
| |
| 23 }; | |
| 24 | |
| 25 } // namespace arc | |
| 26 | |
| 27 #endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_AUTH_CODE_FETCHER_H_ | |
| OLD | NEW |