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

Side by Side Diff: remoting/test/refresh_token_store.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/protocol_perftest.cc ('k') | remoting/test/refresh_token_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_TEST_REFRESH_TOKEN_STORE_H_ 5 #ifndef REMOTING_TEST_REFRESH_TOKEN_STORE_H_
6 #define REMOTING_TEST_REFRESH_TOKEN_STORE_H_ 6 #define REMOTING_TEST_REFRESH_TOKEN_STORE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 namespace remoting { 16 namespace remoting {
17 namespace test { 17 namespace test {
18 18
19 // Used to store and retrieve refresh tokens. This interface is provided to 19 // Used to store and retrieve refresh tokens. This interface is provided to
20 // allow for stubbing out the storage mechanism for testing. 20 // allow for stubbing out the storage mechanism for testing.
21 class RefreshTokenStore { 21 class RefreshTokenStore {
22 public: 22 public:
23 RefreshTokenStore() {} 23 RefreshTokenStore() {}
24 virtual ~RefreshTokenStore() {} 24 virtual ~RefreshTokenStore() {}
25 25
26 virtual std::string FetchRefreshToken() = 0; 26 virtual std::string FetchRefreshToken() = 0;
27 virtual bool StoreRefreshToken(const std::string& refresh_token) = 0; 27 virtual bool StoreRefreshToken(const std::string& refresh_token) = 0;
28 28
29 // Returns a RefreshTokenStore which reads/writes to a user specific token 29 // Returns a RefreshTokenStore which reads/writes to a user specific token
30 // file on the local disk. 30 // file on the local disk.
31 static scoped_ptr<RefreshTokenStore> OnDisk( 31 static std::unique_ptr<RefreshTokenStore> OnDisk(
32 const std::string& user_name, 32 const std::string& user_name,
33 const base::FilePath& refresh_token_file_path); 33 const base::FilePath& refresh_token_file_path);
34 }; 34 };
35 35
36 } // namespace test 36 } // namespace test
37 } // namespace remoting 37 } // namespace remoting
38 38
39 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_ 39 #endif // REMOTING_TEST_REFRESH_TOKEN_STORE_H_
OLDNEW
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | remoting/test/refresh_token_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698