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

Side by Side Diff: google_apis/gaia/oauth2_api_call_flow.cc

Issue 2035293002: Remove URLRequest::GetResponseCookies and URLRequestJob::GetResponseCookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments rogerta Created 4 years, 6 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
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 "google_apis/gaia/oauth2_api_call_flow.h" 5 #include "google_apis/gaia/oauth2_api_call_flow.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "google_apis/gaia/gaia_urls.h" 11 #include "google_apis/gaia/gaia_urls.h"
12 #include "net/base/escape.h" 12 #include "net/base/escape.h"
13 #include "net/base/load_flags.h" 13 #include "net/base/load_flags.h"
14 #include "net/http/http_status_code.h" 14 #include "net/http/http_status_code.h"
15 #include "net/url_request/url_request_context_getter.h" 15 #include "net/url_request/url_request_context_getter.h"
16 #include "net/url_request/url_request_status.h" 16 #include "net/url_request/url_request_status.h"
17 17
18 using net::ResponseCookies;
19 using net::URLFetcher; 18 using net::URLFetcher;
20 using net::URLFetcherDelegate; 19 using net::URLFetcherDelegate;
21 using net::URLRequestContextGetter; 20 using net::URLRequestContextGetter;
22 using net::URLRequestStatus; 21 using net::URLRequestStatus;
23 22
24 namespace { 23 namespace {
25 static const char kAuthorizationHeaderFormat[] = 24 static const char kAuthorizationHeaderFormat[] =
26 "Authorization: Bearer %s"; 25 "Authorization: Bearer %s";
27 26
28 static std::string MakeAuthorizationHeader(const std::string& auth_token) { 27 static std::string MakeAuthorizationHeader(const std::string& auth_token) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 result->SetAutomaticallyRetryOnNetworkChanges(3); 92 result->SetAutomaticallyRetryOnNetworkChanges(3);
94 93
95 // Even if the the body is empty, we still set the Content-Type because an 94 // Even if the the body is empty, we still set the Content-Type because an
96 // empty string may be a meaningful value. For example, a Protocol Buffer 95 // empty string may be a meaningful value. For example, a Protocol Buffer
97 // message with only default values will be serialized as an empty string. 96 // message with only default values will be serialized as an empty string.
98 if (request_type != net::URLFetcher::GET) 97 if (request_type != net::URLFetcher::GET)
99 result->SetUploadData(CreateApiCallBodyContentType(), body); 98 result->SetUploadData(CreateApiCallBodyContentType(), body);
100 99
101 return result; 100 return result;
102 } 101 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698