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

Side by Side Diff: net/tools/quic/quic_client.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('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/tools/quic/quic_client.h" 5 #include "net/tools/quic/quic_client.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <netinet/in.h> 8 #include <netinet/in.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/epoll.h> 10 #include <sys/epoll.h>
(...skipping 25 matching lines...) Expand all
36 local_port_(0), 36 local_port_(0),
37 fd_(-1), 37 fd_(-1),
38 initialized_(false), 38 initialized_(false),
39 packets_dropped_(0), 39 packets_dropped_(0),
40 overflow_supported_(false) { 40 overflow_supported_(false) {
41 epoll_server_.set_timeout_in_us(50 * 1000); 41 epoll_server_.set_timeout_in_us(50 * 1000);
42 } 42 }
43 43
44 QuicClient::~QuicClient() { 44 QuicClient::~QuicClient() {
45 if (connected()) { 45 if (connected()) {
46 session()->connection()->SendConnectionClosePacket( 46 session()->connection()
47 QUIC_PEER_GOING_AWAY, ""); 47 ->SendConnectionClosePacket(QUIC_PEER_GOING_AWAY, std::string());
48 } 48 }
49 } 49 }
50 50
51 bool QuicClient::Initialize() { 51 bool QuicClient::Initialize() {
52 int address_family = server_address_.GetSockAddrFamily(); 52 int address_family = server_address_.GetSockAddrFamily();
53 fd_ = socket(address_family, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP); 53 fd_ = socket(address_family, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP);
54 if (fd_ < 0) { 54 if (fd_ < 0) {
55 LOG(ERROR) << "CreateSocket() failed: " << strerror(errno); 55 LOG(ERROR) << "CreateSocket() failed: " << strerror(errno);
56 return false; 56 return false;
57 } 57 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 IPEndPoint client_address(client_ip, client_address_.port()); 241 IPEndPoint client_address(client_ip, client_address_.port());
242 session_->connection()->ProcessUdpPacket( 242 session_->connection()->ProcessUdpPacket(
243 client_address, server_address, packet); 243 client_address, server_address, packet);
244 return true; 244 return true;
245 } 245 }
246 246
247 } // namespace tools 247 } // namespace tools
248 } // namespace net 248 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698