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

Side by Side Diff: chrome/common/net/gaia/gaia_auth_fetcher.cc

Issue 10412050: Change most content::URLFetcher references to net::URLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS, address comments Created 8 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 | Annotate | Revision Log
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 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" 5 #include "chrome/common/net/gaia/gaia_auth_fetcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // static 227 // static
228 net::URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher( 228 net::URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher(
229 net::URLRequestContextGetter* getter, 229 net::URLRequestContextGetter* getter,
230 const std::string& body, 230 const std::string& body,
231 const std::string& headers, 231 const std::string& headers,
232 const GURL& gaia_gurl, 232 const GURL& gaia_gurl,
233 int load_flags, 233 int load_flags,
234 net::URLFetcherDelegate* delegate) { 234 net::URLFetcherDelegate* delegate) {
235 net::URLFetcher* to_return = content::URLFetcher::Create( 235 net::URLFetcher* to_return = content::URLFetcher::Create(
236 0, gaia_gurl, 236 0, gaia_gurl,
237 body == "" ? content::URLFetcher::GET : content::URLFetcher::POST, 237 body == "" ? net::URLFetcher::GET : net::URLFetcher::POST,
238 delegate); 238 delegate);
239 to_return->SetRequestContext(getter); 239 to_return->SetRequestContext(getter);
240 to_return->SetUploadData("application/x-www-form-urlencoded", body); 240 to_return->SetUploadData("application/x-www-form-urlencoded", body);
241 241
242 // The Gaia token exchange requests do not require any cookie-based 242 // The Gaia token exchange requests do not require any cookie-based
243 // identification as part of requests. We suppress sending any cookies to 243 // identification as part of requests. We suppress sending any cookies to
244 // maintain a separation between the user's browsing and Chrome's internal 244 // maintain a separation between the user's browsing and Chrome's internal
245 // services. Where such mixing is desired (MergeSession), it will be done 245 // services. Where such mixing is desired (MergeSession), it will be done
246 // explicitly. 246 // explicitly.
247 to_return->SetLoadFlags(load_flags); 247 to_return->SetLoadFlags(load_flags);
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 NOTREACHED(); 1149 NOTREACHED();
1150 } 1150 }
1151 } 1151 }
1152 1152
1153 // static 1153 // static
1154 bool GaiaAuthFetcher::IsSecondFactorSuccess( 1154 bool GaiaAuthFetcher::IsSecondFactorSuccess(
1155 const std::string& alleged_error) { 1155 const std::string& alleged_error) {
1156 return alleged_error.find(kSecondFactor) != 1156 return alleged_error.find(kSecondFactor) !=
1157 std::string::npos; 1157 std::string::npos;
1158 } 1158 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698