OLD | NEW |
(Empty) | |
| 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 |
| 5 #include "remoting/test/fake_refresh_token_store.h" |
| 6 |
| 7 namespace { |
| 8 const char kRefreshTokenValue[] = "1/lkjalseLKJlsiJgr45jbv"; |
| 9 } |
| 10 |
| 11 namespace remoting { |
| 12 namespace test { |
| 13 |
| 14 FakeRefreshTokenStore::FakeRefreshTokenStore() |
| 15 : refresh_token_value_(kRefreshTokenValue), |
| 16 refresh_token_write_succeeded_(true), |
| 17 refresh_token_write_attempted_(false) { |
| 18 } |
| 19 |
| 20 FakeRefreshTokenStore::~FakeRefreshTokenStore() { |
| 21 } |
| 22 |
| 23 std::string FakeRefreshTokenStore::FetchRefreshToken() { |
| 24 return refresh_token_value_; |
| 25 } |
| 26 |
| 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; |
| 32 |
| 33 return refresh_token_write_succeeded_; |
| 34 } |
| 35 |
| 36 } // namespace test |
| 37 } // namespace remoting |
OLD | NEW |