Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: remoting/test/fake_refresh_token_store.cc

Issue 1237883002: Added chromoting test environment for the tests to share data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unittest, display connection stats ability, and error check for transition delay. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/test/fake_refresh_token_store.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « remoting/test/fake_refresh_token_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698