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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 3 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/dns/dns_test_util.h" 5 #include "net/dns/dns_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/big_endian.h" 9 #include "base/big_endian.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 public: 164 public:
165 explicit MockTransactionFactory(const MockDnsClientRuleList& rules) 165 explicit MockTransactionFactory(const MockDnsClientRuleList& rules)
166 : rules_(rules) {} 166 : rules_(rules) {}
167 167
168 ~MockTransactionFactory() override {} 168 ~MockTransactionFactory() override {}
169 169
170 std::unique_ptr<DnsTransaction> CreateTransaction( 170 std::unique_ptr<DnsTransaction> CreateTransaction(
171 const std::string& hostname, 171 const std::string& hostname,
172 uint16_t qtype, 172 uint16_t qtype,
173 const DnsTransactionFactory::CallbackType& callback, 173 const DnsTransactionFactory::CallbackType& callback,
174 const BoundNetLog&) override { 174 const NetLogWithSource&) override {
175 MockTransaction* transaction = 175 MockTransaction* transaction =
176 new MockTransaction(rules_, hostname, qtype, callback); 176 new MockTransaction(rules_, hostname, qtype, callback);
177 if (transaction->delayed()) 177 if (transaction->delayed())
178 delayed_transactions_.push_back(transaction->AsWeakPtr()); 178 delayed_transactions_.push_back(transaction->AsWeakPtr());
179 return std::unique_ptr<DnsTransaction>(transaction); 179 return std::unique_ptr<DnsTransaction>(transaction);
180 } 180 }
181 181
182 void CompleteDelayedTransactions() { 182 void CompleteDelayedTransactions() {
183 DelayedTransactionList old_delayed_transactions; 183 DelayedTransactionList old_delayed_transactions;
184 old_delayed_transactions.swap(delayed_transactions_); 184 old_delayed_transactions.swap(delayed_transactions_);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 std::unique_ptr<const base::Value> MockDnsClient::GetPersistentData() const { 226 std::unique_ptr<const base::Value> MockDnsClient::GetPersistentData() const {
227 return std::unique_ptr<const base::Value>(); 227 return std::unique_ptr<const base::Value>();
228 } 228 }
229 229
230 void MockDnsClient::CompleteDelayedTransactions() { 230 void MockDnsClient::CompleteDelayedTransactions() {
231 factory_->CompleteDelayedTransactions(); 231 factory_->CompleteDelayedTransactions();
232 } 232 }
233 233
234 } // namespace net 234 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698