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

Unified Diff: net/tools/flip_server/flip_config.cc

Issue 93793004: Format and Refactor Flip Server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/flip_server/flip_config.h ('k') | net/tools/flip_server/flip_in_mem_edsm_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/flip_server/flip_config.cc
diff --git a/net/tools/flip_server/flip_config.cc b/net/tools/flip_server/flip_config.cc
index c32937cdb3bea31bfb89f8c04271e8b6a5ce203f..8be1fe03291abd29f6d2286539d9b79e8f90cb41 100644
--- a/net/tools/flip_server/flip_config.cc
+++ b/net/tools/flip_server/flip_config.cc
@@ -23,7 +23,7 @@ FlipAcceptor::FlipAcceptor(enum FlipHandlerType flip_handler_type,
int accepts_per_wake,
bool reuseport,
bool wait_for_iface,
- void *memory_cache)
+ void* memory_cache)
: flip_handler_type_(flip_handler_type),
listen_ip_(listen_ip),
listen_port_(listen_port),
@@ -58,16 +58,15 @@ FlipAcceptor::FlipAcceptor(enum FlipHandlerType flip_handler_type,
wait_for_iface,
disable_nagle_,
&listen_fd_);
- if ( ret == 0 ) {
+ if (ret == 0) {
break;
- } else if ( ret == -3 && wait_for_iface ) {
+ } else if (ret == -3 && wait_for_iface) {
// Binding error EADDRNOTAVAIL was encounted. We need
// to wait for the interfaces to raised. try again.
usleep(200000);
} else {
LOG(ERROR) << "Unable to create listening socket for: ret = " << ret
- << ": " << listen_ip_.c_str() << ":"
- << listen_port_.c_str();
+ << ": " << listen_ip_.c_str() << ":" << listen_port_.c_str();
return;
}
}
@@ -82,15 +81,14 @@ FlipAcceptor::FlipAcceptor(enum FlipHandlerType flip_handler_type,
VLOG(1) << "\tType : HTTP Server";
VLOG(1) << "\tIP : " << listen_ip_;
VLOG(1) << "\tPort : " << listen_port_;
- VLOG(1) << "\tHTTP Server : " << http_server_ip_ << ":"
- << http_server_port_;
+ VLOG(1) << "\tHTTP Server : " << http_server_ip_ << ":" << http_server_port_;
VLOG(1) << "\tHTTPS Server : " << https_server_ip_ << ":"
<< https_server_port_;
- VLOG(1) << "\tSSL : "
- << (ssl_cert_filename.size()?"true":"false");
+ VLOG(1) << "\tSSL : " << (ssl_cert_filename.size() ? "true"
+ : "false");
VLOG(1) << "\tCertificate : " << ssl_cert_filename;
VLOG(1) << "\tKey : " << ssl_key_filename;
- VLOG(1) << "\tSpdy Only : " << (spdy_only?"true":"false");
+ VLOG(1) << "\tSpdy Only : " << (spdy_only ? "true" : "false");
}
FlipAcceptor::~FlipAcceptor() {}
@@ -98,8 +96,7 @@ FlipAcceptor::~FlipAcceptor() {}
FlipConfig::FlipConfig()
: server_think_time_in_s_(0),
log_destination_(logging::LOG_TO_SYSTEM_DEBUG_LOG),
- wait_for_iface_(false) {
-}
+ wait_for_iface_(false) {}
FlipConfig::~FlipConfig() {}
@@ -118,7 +115,7 @@ void FlipConfig::AddAcceptor(enum FlipHandlerType flip_handler_type,
int accepts_per_wake,
bool reuseport,
bool wait_for_iface,
- void *memory_cache) {
+ void* memory_cache) {
// TODO(mbelshe): create a struct FlipConfigArgs{} for the arguments.
acceptors_.push_back(new FlipAcceptor(flip_handler_type,
listen_ip,
@@ -138,4 +135,4 @@ void FlipConfig::AddAcceptor(enum FlipHandlerType flip_handler_type,
memory_cache));
}
-} // namespace
+} // namespace net
« no previous file with comments | « net/tools/flip_server/flip_config.h ('k') | net/tools/flip_server/flip_in_mem_edsm_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698