Roll src/third_party/skia f559de4:94e5010
[chromium-blink-merge.git] / remoting / test / refresh_token_store.h
blob6e287a0a62481cb788e30164eb0cfb617bdf2479
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 #ifndef REMOTING_TEST_REFRESH_TOKEN_STORE_H_
6 #define REMOTING_TEST_REFRESH_TOKEN_STORE_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace remoting {
13 namespace test {
15 // Used to store and retrieve refresh tokens. This interface is provided to
16 // allow for stubbing out the storage mechanism for testing.
17 class RefreshTokenStore {
18 public:
19 RefreshTokenStore() {}
20 virtual ~RefreshTokenStore() {}
22 virtual std::string FetchRefreshToken() = 0;
23 virtual bool StoreRefreshToken(const std::string& refresh_token) = 0;
25 // Returns a RefreshTokenStore which reads/writes to a user specific token
26 // file on the local disk.
27 static scoped_ptr<RefreshTokenStore> OnDisk(const std::string& user_name);
30 } // namespace test
31 } // namespace remoting
33 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_