| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ | 5 #ifndef CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ |
| 6 #define CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ | 6 #define CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Start a TokenAuth request to pre-login the user with the given credentials. | 76 // Start a TokenAuth request to pre-login the user with the given credentials. |
| 77 void StartTokenAuth(const std::string& auth_token); | 77 void StartTokenAuth(const std::string& auth_token); |
| 78 | 78 |
| 79 // Start a MergeSession request to pre-login the user with the given | 79 // Start a MergeSession request to pre-login the user with the given |
| 80 // credentials. Unlike TokenAuth above, MergeSession will not sign out any | 80 // credentials. Unlike TokenAuth above, MergeSession will not sign out any |
| 81 // existing accounts. | 81 // existing accounts. |
| 82 void StartMergeSession(const std::string& auth_token); | 82 void StartMergeSession(const std::string& auth_token); |
| 83 | 83 |
| 84 // Implementation of content::URLFetcherDelegate | 84 // Implementation of content::URLFetcherDelegate |
| 85 virtual void OnURLFetchComplete(const content::URLFetcher* source); | 85 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
| 86 | 86 |
| 87 // StartClientLogin been called && results not back yet? | 87 // StartClientLogin been called && results not back yet? |
| 88 bool HasPendingFetch(); | 88 bool HasPendingFetch(); |
| 89 | 89 |
| 90 // Stop any URL fetches in progress. | 90 // Stop any URL fetches in progress. |
| 91 void CancelRequest(); | 91 void CancelRequest(); |
| 92 | 92 |
| 93 // From a URLFetcher result, generate an appropriate error. | 93 // From a URLFetcher result, generate an appropriate error. |
| 94 // From the API documentation, both IssueAuthToken and ClientLogin have | 94 // From the API documentation, both IssueAuthToken and ClientLogin have |
| 95 // the same error returns. | 95 // the same error returns. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, IncomprehensibleError); | 236 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, IncomprehensibleError); |
| 237 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ServiceUnavailableError); | 237 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ServiceUnavailableError); |
| 238 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, CheckNormalErrorCode); | 238 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, CheckNormalErrorCode); |
| 239 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, CheckTwoFactorResponse); | 239 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, CheckTwoFactorResponse); |
| 240 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, LoginNetFailure); | 240 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, LoginNetFailure); |
| 241 | 241 |
| 242 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher); | 242 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher); |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ | 245 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_H_ |
| OLD | NEW |