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

Side by Side Diff: net/spdy/spdy_proxy_client_socket_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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 // CompletionCallback that causes the SpdyProxyClientSocket to be 1310 // CompletionCallback that causes the SpdyProxyClientSocket to be
1311 // deleted when Run is invoked. 1311 // deleted when Run is invoked.
1312 class DeleteSockCallback : public TestCompletionCallbackBase { 1312 class DeleteSockCallback : public TestCompletionCallbackBase {
1313 public: 1313 public:
1314 explicit DeleteSockCallback(scoped_ptr<SpdyProxyClientSocket>* sock) 1314 explicit DeleteSockCallback(scoped_ptr<SpdyProxyClientSocket>* sock)
1315 : sock_(sock), 1315 : sock_(sock),
1316 callback_(base::Bind(&DeleteSockCallback::OnComplete, 1316 callback_(base::Bind(&DeleteSockCallback::OnComplete,
1317 base::Unretained(this))) { 1317 base::Unretained(this))) {
1318 } 1318 }
1319 1319
1320 virtual ~DeleteSockCallback() { 1320 ~DeleteSockCallback() override {}
1321 }
1322 1321
1323 const CompletionCallback& callback() const { return callback_; } 1322 const CompletionCallback& callback() const { return callback_; }
1324 1323
1325 private: 1324 private:
1326 void OnComplete(int result) { 1325 void OnComplete(int result) {
1327 sock_->reset(NULL); 1326 sock_->reset(NULL);
1328 SetResult(result); 1327 SetResult(result);
1329 } 1328 }
1330 1329
1331 scoped_ptr<SpdyProxyClientSocket>* sock_; 1330 scoped_ptr<SpdyProxyClientSocket>* sock_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1374
1376 EXPECT_FALSE(sock_.get()); 1375 EXPECT_FALSE(sock_.get());
1377 EXPECT_TRUE(read_callback.have_result()); 1376 EXPECT_TRUE(read_callback.have_result());
1378 EXPECT_FALSE(write_callback_.have_result()); 1377 EXPECT_FALSE(write_callback_.have_result());
1379 1378
1380 // Let the RST_STREAM write while |rst| is in-scope. 1379 // Let the RST_STREAM write while |rst| is in-scope.
1381 base::MessageLoop::current()->RunUntilIdle(); 1380 base::MessageLoop::current()->RunUntilIdle();
1382 } 1381 }
1383 1382
1384 } // namespace net 1383 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698