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

Unified Diff: net/http/proxy_client_socket.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: net/http/proxy_client_socket.cc
diff --git a/net/http/proxy_client_socket.cc b/net/http/proxy_client_socket.cc
index dcfae037ce721c92bd95dfa3aeded77bd2f6bf62..da306c3f232cefbe22ff63214caf89f0ff93aefe 100644
--- a/net/http/proxy_client_socket.cc
+++ b/net/http/proxy_client_socket.cc
@@ -27,8 +27,8 @@ void ProxyClientSocket::BuildTunnelRequest(
// RFC 2616 Section 9 says the Host request-header field MUST accompany all
// HTTP/1.1 requests. Add "Proxy-Connection: keep-alive" for compat with
// HTTP/1.0 proxies such as Squid (required for NTLM authentication).
- *request_line = base::StringPrintf(
- "CONNECT %s HTTP/1.1\r\n", endpoint.ToString().c_str());
+ *request_line = base::StringPrintf("CONNECT %s HTTP/1.1\r\n",
+ endpoint.ToString().c_str());
request_headers->SetHeader(HttpRequestHeaders::kHost,
GetHostAndOptionalPort(request_info.url));
request_headers->SetHeader(HttpRequestHeaders::kProxyConnection,
@@ -36,7 +36,7 @@ void ProxyClientSocket::BuildTunnelRequest(
std::string user_agent;
if (request_info.extra_headers.GetHeader(HttpRequestHeaders::kUserAgent,
- &user_agent))
+ &user_agent))
request_headers->SetHeader(HttpRequestHeaders::kUserAgent, user_agent);
request_headers->MergeFrom(auth_headers);
@@ -81,16 +81,15 @@ bool ProxyClientSocket::SanitizeProxyRedirect(HttpResponseInfo* response,
return false;
// Return minimal headers; set "Content-length: 0" to ignore response body.
- std::string fake_response_headers =
- base::StringPrintf("HTTP/1.0 302 Found\n"
- "Location: %s\n"
- "Content-length: 0\n"
- "Connection: close\n"
- "\n",
- location.c_str());
- std::string raw_headers =
- HttpUtil::AssembleRawHeaders(fake_response_headers.data(),
- fake_response_headers.length());
+ std::string fake_response_headers = base::StringPrintf(
+ "HTTP/1.0 302 Found\n"
+ "Location: %s\n"
+ "Content-length: 0\n"
+ "Connection: close\n"
+ "\n",
+ location.c_str());
+ std::string raw_headers = HttpUtil::AssembleRawHeaders(
+ fake_response_headers.data(), fake_response_headers.length());
response->headers = new HttpResponseHeaders(raw_headers);
return true;

Powered by Google App Engine
This is Rietveld 408576698