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

Side by Side Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.h

Issue 8761016: Shaving parallel authenticator yak to remove unnecessary dependency on this class from OAuth spec... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
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>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/net/chrome_cookie_notification_details.h" 13 #include "chrome/browser/net/chrome_cookie_notification_details.h"
14 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" 14 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h"
15 #include "content/public/common/url_fetcher_delegate.h"
16 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 #include "content/public/common/url_fetcher_delegate.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 19
20 struct ChromeCookieDetails; 20 struct ChromeCookieDetails;
21 21
22 class Browser; 22 class Browser;
23 class Profile; 23 class Profile;
24 24
25 namespace net { 25 namespace net {
26 class URLRequestContextGetter; 26 class URLRequestContextGetter;
27 class URLRequestStatus; 27 class URLRequestStatus;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 std::string* token, 199 std::string* token,
200 std::string* expires_in); 200 std::string* expires_in);
201 201
202 // Tokenize the results of a userinfo fetch. 202 // Tokenize the results of a userinfo fetch.
203 static void ParseUserInfoResponse(const std::string& data, 203 static void ParseUserInfoResponse(const std::string& data,
204 std::string* email); 204 std::string* email);
205 205
206 // From a URLFetcher result, generate an appropriate error. 206 // From a URLFetcher result, generate an appropriate error.
207 static GoogleServiceAuthError GenerateAuthError( 207 static GoogleServiceAuthError GenerateAuthError(
208 const std::string& data, 208 const std::string& data,
209 const net::URLRequestStatus& status); 209 const net::URLRequestStatus& status,
210 int response_code);
210 211
211 // Given parameters, create a OAuth v1 request URL. 212 // Given parameters, create a OAuth v1 request URL.
212 static GURL MakeGetOAuthTokenUrl(const std::string& oauth1_login_scope, 213 static GURL MakeGetOAuthTokenUrl(const std::string& oauth1_login_scope,
213 const std::string& product_name); 214 const std::string& product_name);
214 215
215 // Given parameters, create a OAuthGetAccessToken request body. 216 // Given parameters, create a OAuthGetAccessToken request body.
216 static std::string MakeOAuthGetAccessTokenBody( 217 static std::string MakeOAuthGetAccessTokenBody(
217 const std::string& oauth1_request_token); 218 const std::string& oauth1_request_token);
218 219
219 // Given parameters, create a OAuthLogin request body. 220 // Given parameters, create a OAuthLogin request body.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 std::string request_body_; 254 std::string request_body_;
254 std::string request_headers_; 255 std::string request_headers_;
255 std::string service_scope_; 256 std::string service_scope_;
256 bool fetch_pending_; 257 bool fetch_pending_;
257 AutoFetchLimit auto_fetch_limit_; 258 AutoFetchLimit auto_fetch_limit_;
258 259
259 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthFetcher); 260 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthFetcher);
260 }; 261 };
261 262
262 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_ 263 #endif // CHROME_BROWSER_NET_GAIA_GAIA_OAUTH_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator_unittest.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698