blob: 48af529cfa375e25328d13342c9e049b155de583 [file] [log] [blame]
// 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 "remoting/base/mock_oauth_client.h"
namespace remoting {
MockOAuthClient::MockOAuthClient(const std::string& user_email,
const std::string& refresh_token)
: user_email_(user_email), refresh_token_(refresh_token) {}
MockOAuthClient::~MockOAuthClient() = default;
void MockOAuthClient::GetCredentialsFromAuthCode(
const gaia::OAuthClientInfo& oauth_client_info,
const std::string& auth_code,
bool need_user_email,
CompletionCallback on_done) {
std::move(on_done).Run(need_user_email ? user_email_ : "", refresh_token_);
}
} // namespace remoting