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_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ |
6 #define CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ | 6 #define CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 // Called when a cookie, e. g. oauth_token, changes | 134 // Called when a cookie, e. g. oauth_token, changes |
135 virtual void OnBrowserClosing(Browser* profile, | 135 virtual void OnBrowserClosing(Browser* profile, |
136 bool detail); | 136 bool detail); |
137 | 137 |
138 // Implementation of content::URLFetcherDelegate | 138 // Implementation of content::URLFetcherDelegate |
139 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; | 139 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
140 | 140 |
141 // StartGetOAuthToken (or other Start* routine) been called, but results | 141 // StartGetOAuthToken (or other Start* routine) been called, but results |
142 // are not back yet. | 142 // are not back yet. |
143 virtual bool HasPendingFetch(); | 143 virtual bool HasPendingFetch() const; |
144 | 144 |
145 // Stop any URL fetches in progress. | 145 // Stop any URL fetches in progress. |
146 virtual void CancelRequest(); | 146 virtual void CancelRequest(); |
147 | 147 |
148 private: | 148 private: |
149 // Process the results of a GetOAuthToken fetch via UI. | 149 // Process the results of a GetOAuthToken fetch via UI. |
150 virtual void OnGetOAuthTokenFetched(const std::string& token); | 150 virtual void OnGetOAuthTokenFetched(const std::string& token); |
151 | 151 |
152 // Process the results of a GetOAuthToken fetch for non-UI driven path. | 152 // Process the results of a GetOAuthToken fetch for non-UI driven path. |
153 virtual void OnGetOAuthTokenUrlFetched(const net::ResponseCookies& cookies, | 153 virtual void OnGetOAuthTokenUrlFetched(const net::ResponseCookies& cookies, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 std::string request_body_; | 253 std::string request_body_; |
254 std::string request_headers_; | 254 std::string request_headers_; |
255 std::string service_scope_; | 255 std::string service_scope_; |
256 bool fetch_pending_; | 256 bool fetch_pending_; |
257 AutoFetchLimit auto_fetch_limit_; | 257 AutoFetchLimit auto_fetch_limit_; |
258 | 258 |
259 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthFetcher); | 259 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthFetcher); |
260 }; | 260 }; |
261 | 261 |
262 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ | 262 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ |
OLD | NEW |