OLD | NEW |
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/basictypes.h" | |
11 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
12 #include "google_apis/gaia/gaia_urls.h" | 11 #include "google_apis/gaia/gaia_urls.h" |
13 #include "net/base/escape.h" | 12 #include "net/base/escape.h" |
14 #include "net/base/load_flags.h" | 13 #include "net/base/load_flags.h" |
15 #include "net/http/http_status_code.h" | 14 #include "net/http/http_status_code.h" |
16 #include "net/url_request/url_request_context_getter.h" | 15 #include "net/url_request/url_request_context_getter.h" |
17 #include "net/url_request/url_request_status.h" | 16 #include "net/url_request/url_request_status.h" |
18 | 17 |
19 using net::ResponseCookies; | 18 using net::ResponseCookies; |
20 using net::URLFetcher; | 19 using net::URLFetcher; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 result->SetAutomaticallyRetryOnNetworkChanges(3); | 93 result->SetAutomaticallyRetryOnNetworkChanges(3); |
95 | 94 |
96 // Even if the the body is empty, we still set the Content-Type because an | 95 // Even if the the body is empty, we still set the Content-Type because an |
97 // empty string may be a meaningful value. For example, a Protocol Buffer | 96 // empty string may be a meaningful value. For example, a Protocol Buffer |
98 // message with only default values will be serialized as an empty string. | 97 // message with only default values will be serialized as an empty string. |
99 if (request_type != net::URLFetcher::GET) | 98 if (request_type != net::URLFetcher::GET) |
100 result->SetUploadData(CreateApiCallBodyContentType(), body); | 99 result->SetUploadData(CreateApiCallBodyContentType(), body); |
101 | 100 |
102 return result; | 101 return result; |
103 } | 102 } |
OLD | NEW |