jrw | 8544c70 | 2015-04-27 21:45:26 | [diff] [blame] | 1 | // Copyright 2015 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 | |
nicholss | f620a47c | 2017-02-02 23:39:08 | [diff] [blame] | 5 | #ifndef REMOTING_BASE_MOCK_OAUTH_CLIENT_H_ |
| 6 | #define REMOTING_BASE_MOCK_OAUTH_CLIENT_H_ |
jrw | 8544c70 | 2015-04-27 21:45:26 | [diff] [blame] | 7 | |
nicholss | f620a47c | 2017-02-02 23:39:08 | [diff] [blame] | 8 | #include "remoting/base/oauth_client.h" |
jrw | 8544c70 | 2015-04-27 21:45:26 | [diff] [blame] | 9 | |
| 10 | namespace remoting { |
| 11 | |
| 12 | class MockOAuthClient : public OAuthClient { |
| 13 | public: |
| 14 | MockOAuthClient(const std::string& user_email, |
| 15 | const std::string& refresh_token); |
| 16 | |
| 17 | ~MockOAuthClient() override; |
| 18 | |
| 19 | void GetCredentialsFromAuthCode( |
| 20 | const gaia::OAuthClientInfo& oauth_client_info, |
| 21 | const std::string& auth_code, |
| 22 | bool need_user_email, |
| 23 | CompletionCallback on_done) override; |
| 24 | |
| 25 | private: |
| 26 | std::string user_email_; |
| 27 | std::string refresh_token_; |
| 28 | }; |
| 29 | |
| 30 | } // namespace remoting |
| 31 | |
nicholss | f620a47c | 2017-02-02 23:39:08 | [diff] [blame] | 32 | #endif // REMOTING_BASE_MOCK_OAUTH_CLIENT_H_ |