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_ACCESS_TOKEN_FETCHER_H_ | 5 #ifndef REMOTING_TEST_ACCESS_TOKEN_FETCHER_H_ |
6 #define REMOTING_TEST_ACCESS_TOKEN_FETCHER_H_ | 6 #define REMOTING_TEST_ACCESS_TOKEN_FETCHER_H_ |
7 | 7 |
8 #include <string> | |
9 #include <vector> | |
10 | |
8 #include "base/callback.h" | 11 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
11 #include "google_apis/gaia/gaia_oauth_client.h" | 14 #include "google_apis/gaia/gaia_oauth_client.h" |
12 | 15 |
13 namespace remoting { | 16 namespace remoting { |
14 namespace test { | 17 namespace test { |
15 | 18 |
16 // Supplied by the client for each request to GAIA and returns valid tokens on | 19 // Supplied by the client for each request to GAIA and returns valid tokens on |
17 // success or empty tokens on failure. | 20 // success or empty tokens on failure. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 // Caller-supplied callback used to return valid tokens on success or empty | 66 // Caller-supplied callback used to return valid tokens on success or empty |
64 // tokens on failure. | 67 // tokens on failure. |
65 AccessTokenCallback access_token_callback_; | 68 AccessTokenCallback access_token_callback_; |
66 | 69 |
67 // Retrieved based on the |refresh_token_|. | 70 // Retrieved based on the |refresh_token_|. |
68 std::string access_token_; | 71 std::string access_token_; |
69 | 72 |
70 // Supplied by the caller or retrieved from a caller-supplied auth token. | 73 // Supplied by the caller or retrieved from a caller-supplied auth token. |
71 std::string refresh_token_; | 74 std::string refresh_token_; |
72 | 75 |
76 // Contains the scopes needed when requesting an access token from GAIA. | |
77 std::vector<std::string> oauth_scopes_vector_; | |
Wez
2015/03/21 00:14:01
These seem to be used only in the refresh token ->
joedow
2015/03/21 01:23:59
Wow, great catch. You are correct, This is not ne
| |
78 | |
73 // Holds the client id, secret, and redirect url used to make | 79 // Holds the client id, secret, and redirect url used to make |
74 // the Gaia service request. | 80 // the Gaia service request. |
75 gaia::OAuthClientInfo oauth_client_info_; | 81 gaia::OAuthClientInfo oauth_client_info_; |
76 | 82 |
77 // Used to make token requests to GAIA. | 83 // Used to make token requests to GAIA. |
78 scoped_ptr<gaia::GaiaOAuthClient> auth_client_; | 84 scoped_ptr<gaia::GaiaOAuthClient> auth_client_; |
79 | 85 |
80 DISALLOW_COPY_AND_ASSIGN(AccessTokenFetcher); | 86 DISALLOW_COPY_AND_ASSIGN(AccessTokenFetcher); |
81 }; | 87 }; |
82 | 88 |
83 } // namespace test | 89 } // namespace test |
84 } // namespace remoting | 90 } // namespace remoting |
85 | 91 |
86 #endif // REMOTING_TEST_ACCESS_TOKEN_FETCHER_H_ | 92 #endif // REMOTING_TEST_ACCESS_TOKEN_FETCHER_H_ |
OLD | NEW |