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

Side by Side Diff: net/socket/websocket_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/websocket_transport_client_socket_pool.h" 5 #include "net/socket/websocket_transport_client_socket_pool.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 class RequestSocketCallback : public TestCompletionCallbackBase { 375 class RequestSocketCallback : public TestCompletionCallbackBase {
376 public: 376 public:
377 RequestSocketCallback(ClientSocketHandle* handle, 377 RequestSocketCallback(ClientSocketHandle* handle,
378 WebSocketTransportClientSocketPool* pool) 378 WebSocketTransportClientSocketPool* pool)
379 : handle_(handle), 379 : handle_(handle),
380 pool_(pool), 380 pool_(pool),
381 within_callback_(false), 381 within_callback_(false),
382 callback_(base::Bind(&RequestSocketCallback::OnComplete, 382 callback_(base::Bind(&RequestSocketCallback::OnComplete,
383 base::Unretained(this))) {} 383 base::Unretained(this))) {}
384 384
385 virtual ~RequestSocketCallback() {} 385 ~RequestSocketCallback() override {}
386 386
387 const CompletionCallback& callback() const { return callback_; } 387 const CompletionCallback& callback() const { return callback_; }
388 388
389 private: 389 private:
390 void OnComplete(int result) { 390 void OnComplete(int result) {
391 SetResult(result); 391 SetResult(result);
392 ASSERT_EQ(OK, result); 392 ASSERT_EQ(OK, result);
393 393
394 if (!within_callback_) { 394 if (!within_callback_) {
395 // Don't allow reuse of the socket. Disconnect it and then release it and 395 // Don't allow reuse of the socket. Disconnect it and then release it and
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 EXPECT_EQ(OK, request(1)->WaitForResult()); 1134 EXPECT_EQ(OK, request(1)->WaitForResult());
1135 // Third socket should still be waiting for endpoint. 1135 // Third socket should still be waiting for endpoint.
1136 ASSERT_FALSE(request(2)->handle()->is_initialized()); 1136 ASSERT_FALSE(request(2)->handle()->is_initialized());
1137 EXPECT_EQ(LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET, 1137 EXPECT_EQ(LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET,
1138 request(2)->handle()->GetLoadState()); 1138 request(2)->handle()->GetLoadState());
1139 } 1139 }
1140 1140
1141 } // namespace 1141 } // namespace
1142 1142
1143 } // namespace net 1143 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/websocket_transport_client_socket_pool.h ('k') | net/socket/websocket_transport_connect_sub_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698