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.
5 #include "remoting/test/fake_refresh_token_store.h"
8 const char kRefreshTokenValue
[] = "1/lkjalseLKJlsiJgr45jbv";
14 FakeRefreshTokenStore::FakeRefreshTokenStore()
15 : refresh_token_value_(kRefreshTokenValue
),
16 refresh_token_write_succeeded_(true),
17 refresh_token_write_attempted_(false) {
20 FakeRefreshTokenStore::~FakeRefreshTokenStore() {
23 std::string
FakeRefreshTokenStore::FetchRefreshToken() {
24 return refresh_token_value_
;
27 bool FakeRefreshTokenStore::StoreRefreshToken(
28 const std::string
& refresh_token
) {
29 // Record the information passed to us to write.
30 refresh_token_write_attempted_
= true;
31 stored_refresh_token_value_
= refresh_token
;
33 return refresh_token_write_succeeded_
;
37 } // namespace remoting