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

Unified Diff: chrome/test/chromedriver/server/chromedriver_server.cc

Issue 594393002: Add net::HttpServer::Delegate::OnConnect() function and set ChromeDriver buffer sizes to 100 MB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put as much of the file as possible into the anonymous namespace Created 6 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
Index: chrome/test/chromedriver/server/chromedriver_server.cc
diff --git a/chrome/test/chromedriver/server/chromedriver_server.cc b/chrome/test/chromedriver/server/chromedriver_server.cc
index f06a7fc9c34be71c7626943dbb21534eac2ecc50..97725407d0b55fd375d759dd6c6899a7cd86d49a 100644
--- a/chrome/test/chromedriver/server/chromedriver_server.cc
+++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -38,6 +38,7 @@
namespace {
const char* kLocalHostAddress = "127.0.0.1";
+const int kBufferSize = 100 * 1024 * 1024; // 100 MB
typedef base::Callback<
void(const net::HttpServerRequestInfo&, const HttpResponseSenderFunc&)>
@@ -64,6 +65,10 @@ class HttpServer : public net::HttpServer::Delegate {
}
// Overridden from net::HttpServer::Delegate:
+ virtual void OnConnect(int connection_id) OVERRIDE {
+ server_->SetSendBufferSize(connection_id, kBufferSize);
+ server_->SetReceiveBufferSize(connection_id, kBufferSize);
+ }
virtual void OnHttpRequest(int connection_id,
const net::HttpServerRequestInfo& info) OVERRIDE {
handle_request_func_.Run(

Powered by Google App Engine
This is Rietveld 408576698