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

Side by Side Diff: components/cronet/stale_host_resolver_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/stale_host_resolver.h" 5 #include "components/cronet/stale_host_resolver.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 resolve_pending_ = true; 175 resolve_pending_ = true;
176 resolve_complete_ = false; 176 resolve_complete_ = false;
177 resolve_addresses_ = MakeAddressList(kUninitializedAddress); 177 resolve_addresses_ = MakeAddressList(kUninitializedAddress);
178 resolve_error_ = net::ERR_UNEXPECTED; 178 resolve_error_ = net::ERR_UNEXPECTED;
179 179
180 int rv = 180 int rv =
181 resolver_->Resolve(info, net::DEFAULT_PRIORITY, &resolve_addresses_, 181 resolver_->Resolve(info, net::DEFAULT_PRIORITY, &resolve_addresses_,
182 base::Bind(&StaleHostResolverTest::OnResolveComplete, 182 base::Bind(&StaleHostResolverTest::OnResolveComplete,
183 base::Unretained(this)), 183 base::Unretained(this)),
184 &request_, net::BoundNetLog()); 184 &request_, net::NetLogWithSource());
185 if (rv != net::ERR_IO_PENDING) { 185 if (rv != net::ERR_IO_PENDING) {
186 resolve_pending_ = false; 186 resolve_pending_ = false;
187 resolve_complete_ = true; 187 resolve_complete_ = true;
188 resolve_error_ = rv; 188 resolve_error_ = rv;
189 } 189 }
190 } 190 }
191 191
192 void WaitForResolve() { 192 void WaitForResolve() {
193 if (!resolve_pending_) 193 if (!resolve_pending_)
194 return; 194 return;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 EXPECT_TRUE(resolve_complete()); 489 EXPECT_TRUE(resolve_complete());
490 EXPECT_EQ(net::OK, resolve_error()); 490 EXPECT_EQ(net::OK, resolve_error());
491 EXPECT_EQ(1u, resolve_addresses().size()); 491 EXPECT_EQ(1u, resolve_addresses().size());
492 EXPECT_EQ(kCacheAddress, resolve_addresses()[0].ToStringWithoutPort()); 492 EXPECT_EQ(kCacheAddress, resolve_addresses()[0].ToStringWithoutPort());
493 } 493 }
494 494
495 } // namespace 495 } // namespace
496 496
497 } // namespace cronet 497 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698