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 #ifndef REMOTING_TEST_REFRESH_TOKEN_STORE_H_ | |
6 #define REMOTING_TEST_REFRESH_TOKEN_STORE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 namespace remoting { | |
13 namespace test { | |
14 | |
15 // Used to allow classes which use this functionality to remove the file system | |
16 // dependency for testing. | |
Wez
2015/02/19 22:00:24
What functionality?
joedow
2015/02/20 02:58:36
Done.
| |
17 class RefreshTokenStoreInterface { | |
Wez
2015/02/19 22:00:24
RefreshTokenStore - Chromium style has the interfa
joedow
2015/02/20 02:58:36
Done.
| |
18 public: | |
19 RefreshTokenStoreInterface() {} | |
20 virtual ~RefreshTokenStoreInterface() {} | |
21 | |
22 virtual std::string ReadRefreshTokenFromDisk( | |
Wez
2015/02/19 22:00:24
This name assumes an on-disk implementation, but t
joedow
2015/02/20 02:58:36
Done.
| |
23 const std::string& user_name) = 0; | |
24 virtual bool WriteRefreshTokenToDisk( | |
25 const std::string& user_name, | |
26 const std::string& refresh_token) = 0; | |
27 }; | |
28 | |
29 scoped_ptr<RefreshTokenStoreInterface> GetRefreshTokenStoreForDisk(); | |
Wez
2015/02/19 22:00:24
Suggest making this a static OnDisk() method in Re
joedow
2015/02/20 02:58:36
Done.
| |
30 | |
31 } // namespace test | |
32 } // namespace remoting | |
33 | |
34 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_ | |
OLD | NEW |