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

Side by Side Diff: net/dns/single_request_host_resolver_unittest.cc

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment 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/dns/serial_worker_unittest.cc ('k') | net/extras/sqlite/sqlite_channel_id_store.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/dns/single_request_host_resolver.h" 5 #include "net/dns/single_request_host_resolver.h"
6 6
7 #include "net/base/address_list.h" 7 #include "net/base/address_list.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 17 matching lines...) Expand all
28 28
29 bool has_outstanding_request() const { 29 bool has_outstanding_request() const {
30 return outstanding_request_ != NULL; 30 return outstanding_request_ != NULL;
31 } 31 }
32 32
33 virtual int Resolve(const RequestInfo& info, 33 virtual int Resolve(const RequestInfo& info,
34 RequestPriority priority, 34 RequestPriority priority,
35 AddressList* addresses, 35 AddressList* addresses,
36 const CompletionCallback& callback, 36 const CompletionCallback& callback,
37 RequestHandle* out_req, 37 RequestHandle* out_req,
38 const BoundNetLog& net_log) OVERRIDE { 38 const BoundNetLog& net_log) override {
39 EXPECT_FALSE(has_outstanding_request()); 39 EXPECT_FALSE(has_outstanding_request());
40 outstanding_request_ = reinterpret_cast<RequestHandle>(0x1234); 40 outstanding_request_ = reinterpret_cast<RequestHandle>(0x1234);
41 *out_req = outstanding_request_; 41 *out_req = outstanding_request_;
42 42
43 // Never complete this request! Caller is expected to cancel it 43 // Never complete this request! Caller is expected to cancel it
44 // before destroying the resolver. 44 // before destroying the resolver.
45 return ERR_IO_PENDING; 45 return ERR_IO_PENDING;
46 } 46 }
47 47
48 virtual int ResolveFromCache(const RequestInfo& info, 48 virtual int ResolveFromCache(const RequestInfo& info,
49 AddressList* addresses, 49 AddressList* addresses,
50 const BoundNetLog& net_log) OVERRIDE { 50 const BoundNetLog& net_log) override {
51 NOTIMPLEMENTED(); 51 NOTIMPLEMENTED();
52 return ERR_UNEXPECTED; 52 return ERR_UNEXPECTED;
53 } 53 }
54 54
55 virtual void CancelRequest(RequestHandle req) OVERRIDE { 55 virtual void CancelRequest(RequestHandle req) override {
56 EXPECT_TRUE(has_outstanding_request()); 56 EXPECT_TRUE(has_outstanding_request());
57 EXPECT_EQ(req, outstanding_request_); 57 EXPECT_EQ(req, outstanding_request_);
58 outstanding_request_ = NULL; 58 outstanding_request_ = NULL;
59 } 59 }
60 60
61 private: 61 private:
62 RequestHandle outstanding_request_; 62 RequestHandle outstanding_request_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(HangingHostResolver); 64 DISALLOW_COPY_AND_ASSIGN(HangingHostResolver);
65 }; 65 };
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SingleRequestHostResolver single_request_resolver(&resolver); 119 SingleRequestHostResolver single_request_resolver(&resolver);
120 single_request_resolver.Cancel(); 120 single_request_resolver.Cancel();
121 121
122 // To pass, HangingHostResolver should not have received a cancellation 122 // To pass, HangingHostResolver should not have received a cancellation
123 // request (since there is nothing to cancel). If it does, it will crash. 123 // request (since there is nothing to cancel). If it does, it will crash.
124 } 124 }
125 125
126 } // namespace 126 } // namespace
127 127
128 } // namespace net 128 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/serial_worker_unittest.cc ('k') | net/extras/sqlite/sqlite_channel_id_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698