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 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() {} | |
21 | |
22 virtual std::string FetchRefreshToken( | |
23 const std::string& user_name) = 0; | |
24 virtual bool StoreRefreshToken( | |
25 const std::string& user_name, | |
26 const std::string& refresh_token) = 0; | |
27 | |
28 // Stores and retrieves a refresh token from a file in a user-readable folder | |
29 // on the local disk. If needed, the file is created and has its permissions | |
Wez
2015/02/24 03:10:19
No it doesn't. ;) It returns an token store that
joedow1
2015/02/24 05:17:41
Done.
| |
30 // set for the local user account when the first refresh_token is stored. The | |
31 // path to the folder includes the |user_name| so that refresh_tokens for | |
32 // multiple users can be stored on the same machine. | |
Wez
2015/02/24 03:10:19
Should |user_name| be a parameter to the store cre
joedow1
2015/02/24 05:17:41
I think this is a by product of the original funct
| |
33 static scoped_ptr<RefreshTokenStore> OnDisk(); | |
34 }; | |
35 | |
36 } // namespace test | |
37 } // namespace remoting | |
38 | |
39 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_ | |
OLD | NEW |