Update V8 to version 4.6.55.
[chromium-blink-merge.git] / remoting / test / refresh_token_store.h
blob1ee2f500192d5022c436dc150ba292fcd63a91a2
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 base {
13 class FilePath;
16 namespace remoting {
17 namespace test {
19 // Used to store and retrieve refresh tokens. This interface is provided to
20 // allow for stubbing out the storage mechanism for testing.
21 class RefreshTokenStore {
22 public:
23 RefreshTokenStore() {}
24 virtual ~RefreshTokenStore() {}
26 virtual std::string FetchRefreshToken() = 0;
27 virtual bool StoreRefreshToken(const std::string& refresh_token) = 0;
29 // Returns a RefreshTokenStore which reads/writes to a user specific token
30 // file on the local disk.
31 static scoped_ptr<RefreshTokenStore> OnDisk(
32 const std::string& user_name,
33 const base::FilePath& refresh_token_file_path);
36 } // namespace test
37 } // namespace remoting
39 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_