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

Side by Side Diff: components/update_client/request_sender.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 | « components/update_client/action_wait.cc ('k') | components/update_client/update_checker.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/update_client/request_sender.h" 5 #include "components/update_client/request_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 query_params.c_str()) 200 query_params.c_str())
201 : query_params); 201 : query_params);
202 GURL::Replacements replacements; 202 GURL::Replacements replacements;
203 replacements.SetQueryStr(query_string); 203 replacements.SetQueryStr(query_string);
204 204
205 return url.ReplaceComponents(replacements); 205 return url.ReplaceComponents(replacements);
206 } 206 }
207 207
208 std::string RequestSender::GetStringHeaderValue(const net::URLFetcher* source, 208 std::string RequestSender::GetStringHeaderValue(const net::URLFetcher* source,
209 const char* header_name) { 209 const char* header_name) {
210 const auto response_headers(source->GetResponseHeaders()); 210 auto* response_headers(source->GetResponseHeaders());
211 if (!response_headers) 211 if (!response_headers)
212 return std::string(); 212 return std::string();
213 213
214 std::string etag; 214 std::string etag;
215 return response_headers->EnumerateHeader(nullptr, header_name, &etag) 215 return response_headers->EnumerateHeader(nullptr, header_name, &etag)
216 ? etag 216 ? etag
217 : std::string(); 217 : std::string();
218 } 218 }
219 219
220 int64_t RequestSender::GetInt64HeaderValue(const net::URLFetcher* source, 220 int64_t RequestSender::GetInt64HeaderValue(const net::URLFetcher* source,
221 const char* header_name) { 221 const char* header_name) {
222 const auto response_headers(source->GetResponseHeaders()); 222 auto* response_headers(source->GetResponseHeaders());
223 return response_headers ? response_headers->GetInt64HeaderValue(header_name) 223 return response_headers ? response_headers->GetInt64HeaderValue(header_name)
224 : -1; 224 : -1;
225 } 225 }
226 226
227 } // namespace update_client 227 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/action_wait.cc ('k') | components/update_client/update_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698