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

Side by Side Diff: net/server/http_server.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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 | « net/server/http_server.h ('k') | net/server/http_server_response_info.h » ('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 (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 "net/server/http_server.h" 5 #include "net/server/http_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // connection. Instead of referencing connection with ID all the time, 116 // connection. Instead of referencing connection with ID all the time,
117 // destroys the connection in next run loop to make sure any pending 117 // destroys the connection in next run loop to make sure any pending
118 // callbacks in the call stack return. 118 // callbacks in the call stack return.
119 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, connection); 119 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, connection);
120 } 120 }
121 121
122 int HttpServer::GetLocalAddress(IPEndPoint* address) { 122 int HttpServer::GetLocalAddress(IPEndPoint* address) {
123 return server_socket_->GetLocalAddress(address); 123 return server_socket_->GetLocalAddress(address);
124 } 124 }
125 125
126 void HttpServer::SetReceiveBufferSize(int connection_id, int32 size) { 126 void HttpServer::SetReceiveBufferSize(int connection_id, int32_t size) {
127 HttpConnection* connection = FindConnection(connection_id); 127 HttpConnection* connection = FindConnection(connection_id);
128 if (connection) 128 if (connection)
129 connection->read_buf()->set_max_buffer_size(size); 129 connection->read_buf()->set_max_buffer_size(size);
130 } 130 }
131 131
132 void HttpServer::SetSendBufferSize(int connection_id, int32 size) { 132 void HttpServer::SetSendBufferSize(int connection_id, int32_t size) {
133 HttpConnection* connection = FindConnection(connection_id); 133 HttpConnection* connection = FindConnection(connection_id);
134 if (connection) 134 if (connection)
135 connection->write_buf()->set_max_buffer_size(size); 135 connection->write_buf()->set_max_buffer_size(size);
136 } 136 }
137 137
138 void HttpServer::DoAcceptLoop() { 138 void HttpServer::DoAcceptLoop() {
139 int rv; 139 int rv;
140 do { 140 do {
141 rv = server_socket_->Accept(&accepted_socket_, 141 rv = server_socket_->Accept(&accepted_socket_,
142 base::Bind(&HttpServer::OnAcceptCompleted, 142 base::Bind(&HttpServer::OnAcceptCompleted,
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 // This is called after any delegate callbacks are called to check if Close() 460 // This is called after any delegate callbacks are called to check if Close()
461 // has been called during callback processing. Using the pointer of connection, 461 // has been called during callback processing. Using the pointer of connection,
462 // |connection| is safe here because Close() deletes the connection in next run 462 // |connection| is safe here because Close() deletes the connection in next run
463 // loop. 463 // loop.
464 bool HttpServer::HasClosedConnection(HttpConnection* connection) { 464 bool HttpServer::HasClosedConnection(HttpConnection* connection) {
465 return FindConnection(connection->id()) != connection; 465 return FindConnection(connection->id()) != connection;
466 } 466 }
467 467
468 } // namespace net 468 } // namespace net
OLDNEW
« no previous file with comments | « net/server/http_server.h ('k') | net/server/http_server_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698