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

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

Issue 509563003: Remove implicit conversions from scoped_refptr to T* in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « net/dns/mdns_client_unittest.cc ('k') | net/filter/sdch_filter.cc » ('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/mock_host_resolver.h" 5 #include "net/dns/mock_host_resolver.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 ScopedDefaultHostResolverProc::ScopedDefaultHostResolverProc( 434 ScopedDefaultHostResolverProc::ScopedDefaultHostResolverProc(
435 HostResolverProc* proc) { 435 HostResolverProc* proc) {
436 Init(proc); 436 Init(proc);
437 } 437 }
438 438
439 ScopedDefaultHostResolverProc::~ScopedDefaultHostResolverProc() { 439 ScopedDefaultHostResolverProc::~ScopedDefaultHostResolverProc() {
440 HostResolverProc* old_proc = 440 HostResolverProc* old_proc =
441 HostResolverProc::SetDefault(previous_proc_.get()); 441 HostResolverProc::SetDefault(previous_proc_.get());
442 // The lifetimes of multiple instances must be nested. 442 // The lifetimes of multiple instances must be nested.
443 CHECK_EQ(old_proc, current_proc_); 443 CHECK_EQ(old_proc, current_proc_.get());
444 } 444 }
445 445
446 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) { 446 void ScopedDefaultHostResolverProc::Init(HostResolverProc* proc) {
447 current_proc_ = proc; 447 current_proc_ = proc;
448 previous_proc_ = HostResolverProc::SetDefault(current_proc_.get()); 448 previous_proc_ = HostResolverProc::SetDefault(current_proc_.get());
449 current_proc_->SetLastProc(previous_proc_.get()); 449 current_proc_->SetLastProc(previous_proc_.get());
450 } 450 }
451 451
452 } // namespace net 452 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/mdns_client_unittest.cc ('k') | net/filter/sdch_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698