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

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

Issue 569035: Remove the HostResolver::Shutdown() method.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and address comment Created 10 years, 10 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/base/mock_host_resolver.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/socks_client_socket.h" 5 #include "net/socket/socks_client_socket.h"
6 6
7 #include "net/base/address_list.h" 7 #include "net/base/address_list.h"
8 #include "net/base/load_log.h" 8 #include "net/base/load_log.h"
9 #include "net/base/load_log_unittest.h" 9 #include "net/base/load_log_unittest.h"
10 #include "net/base/mock_host_resolver.h" 10 #include "net/base/mock_host_resolver.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 virtual void CancelRequest(RequestHandle req) { 98 virtual void CancelRequest(RequestHandle req) {
99 EXPECT_TRUE(HasOutstandingRequest()); 99 EXPECT_TRUE(HasOutstandingRequest());
100 EXPECT_EQ(outstanding_request_, req); 100 EXPECT_EQ(outstanding_request_, req);
101 outstanding_request_ = NULL; 101 outstanding_request_ = NULL;
102 } 102 }
103 103
104 virtual void AddObserver(Observer* observer) {} 104 virtual void AddObserver(Observer* observer) {}
105 virtual void RemoveObserver(Observer* observer) {} 105 virtual void RemoveObserver(Observer* observer) {}
106 virtual void Shutdown() {}
107 106
108 bool HasOutstandingRequest() { 107 bool HasOutstandingRequest() {
109 return outstanding_request_ != NULL; 108 return outstanding_request_ != NULL;
110 } 109 }
111 110
112 private: 111 private:
113 RequestHandle outstanding_request_; 112 RequestHandle outstanding_request_;
114 113
115 DISALLOW_COPY_AND_ASSIGN(HangingHostResolver); 114 DISALLOW_COPY_AND_ASSIGN(HangingHostResolver);
116 }; 115 };
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // Disconnect the SOCKS socket -- this should cancel the outstanding resolve. 370 // Disconnect the SOCKS socket -- this should cancel the outstanding resolve.
372 user_sock_->Disconnect(); 371 user_sock_->Disconnect();
373 372
374 EXPECT_FALSE(hanging_resolver->HasOutstandingRequest()); 373 EXPECT_FALSE(hanging_resolver->HasOutstandingRequest());
375 374
376 EXPECT_FALSE(user_sock_->IsConnected()); 375 EXPECT_FALSE(user_sock_->IsConnected());
377 EXPECT_FALSE(user_sock_->IsConnectedAndIdle()); 376 EXPECT_FALSE(user_sock_->IsConnectedAndIdle());
378 } 377 }
379 378
380 } // namespace net 379 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698