OLD | NEW |
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_MOCK_ACCESS_TOKEN_FETCHER_H_ | 5 #ifndef REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ |
6 #define REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ | 6 #define REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ |
7 | 7 |
8 #include "remoting/test/access_token_fetcher.h" | 8 #include "remoting/test/access_token_fetcher.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 17 matching lines...) Expand all Loading... |
28 void(const std::string& auth_code, | 28 void(const std::string& auth_code, |
29 const AccessTokenCallback& callback)); | 29 const AccessTokenCallback& callback)); |
30 | 30 |
31 MOCK_METHOD2(GetAccessTokenFromRefreshToken, | 31 MOCK_METHOD2(GetAccessTokenFromRefreshToken, |
32 void(const std::string& refresh_token, | 32 void(const std::string& refresh_token, |
33 const AccessTokenCallback& callback)); | 33 const AccessTokenCallback& callback)); |
34 | 34 |
35 // Stores an access token fetcher object and wires up the mock methods to call | 35 // Stores an access token fetcher object and wires up the mock methods to call |
36 // through to the appropriate method on it. This method is typically used to | 36 // through to the appropriate method on it. This method is typically used to |
37 // pass a FakeAccessTokenFetcher. | 37 // pass a FakeAccessTokenFetcher. |
38 void SetAccessTokenFetcher(scoped_ptr<AccessTokenFetcher> fetcher); | 38 void SetAccessTokenFetcher(std::unique_ptr<AccessTokenFetcher> fetcher); |
39 | 39 |
40 private: | 40 private: |
41 scoped_ptr<AccessTokenFetcher> internal_access_token_fetcher_; | 41 std::unique_ptr<AccessTokenFetcher> internal_access_token_fetcher_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(MockAccessTokenFetcher); | 43 DISALLOW_COPY_AND_ASSIGN(MockAccessTokenFetcher); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace test | 46 } // namespace test |
47 } // namespace remoting | 47 } // namespace remoting |
48 | 48 |
49 #endif // REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ | 49 #endif // REMOTING_TEST_MOCK_ACCESS_TOKEN_FETCHER_H_ |
OLD | NEW |