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

Unified Diff: net/server/http_listen_socket.cc

Issue 3390026: net: Append base:: in the StringPrintf calls. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix include order Created 10 years, 3 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
« no previous file with comments | « net/proxy/proxy_resolver_v8_unittest.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/http_listen_socket.cc
diff --git a/net/server/http_listen_socket.cc b/net/server/http_listen_socket.cc
index dd6ec3c51b95bc2bc25defbb6e02728e6dbcee09..b4f05d93ee9dc74e57dc9492a9128c8070f77a73 100644
--- a/net/server/http_listen_socket.cc
+++ b/net/server/http_listen_socket.cc
@@ -15,6 +15,7 @@
#include "base/md5.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "net/server/http_listen_socket.h"
#include "net/server/http_server_request_info.h"
@@ -109,14 +110,14 @@ void HttpListenSocket::AcceptWebSocket(const HttpServerRequestInfo& request) {
std::string host = GetHeaderValue(request, "Host");
std::string location = "ws://" + host + request.path;
is_web_socket_ = true;
- Send(StringPrintf("HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
- "Upgrade: WebSocket\r\n"
- "Connection: Upgrade\r\n"
- "Sec-WebSocket-Origin: %s\r\n"
- "Sec-WebSocket-Location: %s\r\n"
- "\r\n",
- origin.c_str(),
- location.c_str()));
+ Send(base::StringPrintf("HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
+ "Upgrade: WebSocket\r\n"
+ "Connection: Upgrade\r\n"
+ "Sec-WebSocket-Origin: %s\r\n"
+ "Sec-WebSocket-Location: %s\r\n"
+ "\r\n",
+ origin.c_str(),
+ location.c_str()));
Send(reinterpret_cast<char*>(digest.a), 16);
}
@@ -131,12 +132,12 @@ void HttpListenSocket::SendOverWebSocket(const std::string& data) {
void HttpListenSocket::Send200(const std::string& data,
const std::string& content_type) {
- Send(StringPrintf("HTTP/1.1 200 OK\r\n"
- "Content-Type:%s\r\n"
- "Content-Length:%d\r\n"
- "\r\n",
- content_type.c_str(),
- static_cast<int>(data.length())));
+ Send(base::StringPrintf("HTTP/1.1 200 OK\r\n"
+ "Content-Type:%s\r\n"
+ "Content-Length:%d\r\n"
+ "\r\n",
+ content_type.c_str(),
+ static_cast<int>(data.length())));
Send(data);
}
@@ -147,13 +148,13 @@ void HttpListenSocket::Send404() {
}
void HttpListenSocket::Send500(const std::string& message) {
- Send(StringPrintf("HTTP/1.1 500 Internal Error\r\n"
- "Content-Type:text/html\r\n"
- "Content-Length:%d\r\n"
- "\r\n"
- "%s",
- static_cast<int>(message.length()),
- message.c_str()));
+ Send(base::StringPrintf("HTTP/1.1 500 Internal Error\r\n"
+ "Content-Type:text/html\r\n"
+ "Content-Length:%d\r\n"
+ "\r\n"
+ "%s",
+ static_cast<int>(message.length()),
+ message.c_str()));
}
//
« no previous file with comments | « net/proxy/proxy_resolver_v8_unittest.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698