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

Side by Side Diff: net/socket/transport_client_socket_pool_unittest.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/socket/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 public: 458 public:
459 RequestSocketCallback(ClientSocketHandle* handle, 459 RequestSocketCallback(ClientSocketHandle* handle,
460 TransportClientSocketPool* pool) 460 TransportClientSocketPool* pool)
461 : handle_(handle), 461 : handle_(handle),
462 pool_(pool), 462 pool_(pool),
463 within_callback_(false), 463 within_callback_(false),
464 callback_(base::Bind(&RequestSocketCallback::OnComplete, 464 callback_(base::Bind(&RequestSocketCallback::OnComplete,
465 base::Unretained(this))) { 465 base::Unretained(this))) {
466 } 466 }
467 467
468 virtual ~RequestSocketCallback() {} 468 ~RequestSocketCallback() override {}
469 469
470 const CompletionCallback& callback() const { return callback_; } 470 const CompletionCallback& callback() const { return callback_; }
471 471
472 private: 472 private:
473 void OnComplete(int result) { 473 void OnComplete(int result) {
474 SetResult(result); 474 SetResult(result);
475 ASSERT_EQ(OK, result); 475 ASSERT_EQ(OK, result);
476 476
477 if (!within_callback_) { 477 if (!within_callback_) {
478 // Don't allow reuse of the socket. Disconnect it and then release it and 478 // Don't allow reuse of the socket. Disconnect it and then release it and
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 handle.socket()->GetLocalAddress(&endpoint); 1103 handle.socket()->GetLocalAddress(&endpoint);
1104 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size()); 1104 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size());
1105 EXPECT_EQ(1, client_socket_factory_.allocation_count()); 1105 EXPECT_EQ(1, client_socket_factory_.allocation_count());
1106 // Verify that TCP FastOpen was not turned on for the socket. 1106 // Verify that TCP FastOpen was not turned on for the socket.
1107 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen()); 1107 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen());
1108 } 1108 }
1109 1109
1110 } // namespace 1110 } // namespace
1111 1111
1112 } // namespace net 1112 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool_test_util.cc ('k') | net/socket/transport_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698