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

Side by Side Diff: google_apis/gaia/gaia_auth_fetcher.h

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 years, 7 months 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
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 5 #ifndef GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 6 #define GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 static std::string MakeGetTokenResponseBody(const std::string& scopes, 404 static std::string MakeGetTokenResponseBody(const std::string& scopes,
405 const std::string& domain, 405 const std::string& domain,
406 const std::string& login_hint); 406 const std::string& login_hint);
407 407
408 // Create a fetcher usable for making any Gaia request. |body| is used 408 // Create a fetcher usable for making any Gaia request. |body| is used
409 // as the body of the POST request sent to GAIA. Any strings listed in 409 // as the body of the POST request sent to GAIA. Any strings listed in
410 // |headers| are added as extra HTTP headers in the request. 410 // |headers| are added as extra HTTP headers in the request.
411 // 411 //
412 // |load_flags| are passed to directly to net::URLFetcher::Create() when 412 // |load_flags| are passed to directly to net::URLFetcher::Create() when
413 // creating the URL fetcher. 413 // creating the URL fetcher.
414 static net::URLFetcher* CreateGaiaFetcher( 414 static scoped_ptr<net::URLFetcher> CreateGaiaFetcher(
415 net::URLRequestContextGetter* getter, 415 net::URLRequestContextGetter* getter,
416 const std::string& body, 416 const std::string& body,
417 const std::string& headers, 417 const std::string& headers,
418 const GURL& gaia_gurl, 418 const GURL& gaia_gurl,
419 int load_flags, 419 int load_flags,
420 net::URLFetcherDelegate* delegate); 420 net::URLFetcherDelegate* delegate);
421 421
422 // From a URLFetcher result, generate an appropriate error. 422 // From a URLFetcher result, generate an appropriate error.
423 // From the API documentation, both IssueAuthToken and ClientLogin have 423 // From the API documentation, both IssueAuthToken and ClientLogin have
424 // the same error returns. 424 // the same error returns.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ParseOAuth2TokenPairResponse); 464 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ParseOAuth2TokenPairResponse);
465 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthSuccess); 465 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthSuccess);
466 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthWithQuote); 466 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthWithQuote);
467 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeSuccess); 467 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeSuccess);
468 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeQuote); 468 FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeQuote);
469 469
470 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher); 470 DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher);
471 }; 471 };
472 472
473 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_ 473 #endif // GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
OLDNEW
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698