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

Unified Diff: net/dns/host_resolver_proc.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/host_resolver_impl_unittest.cc ('k') | net/dns/mock_host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_proc.cc
diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc
index fed3e07e410bc24f56d651966d13027b4a3aa7f6..f2b10c649bad49e5d083024a45e04594f91324f6 100644
--- a/net/dns/host_resolver_proc.cc
+++ b/net/dns/host_resolver_proc.cc
@@ -75,9 +75,9 @@ int HostResolverProc::ResolveUsingPrevious(
HostResolverFlags host_resolver_flags,
AddressList* addrlist,
int* os_error) {
- if (previous_proc_) {
- return previous_proc_->Resolve(host, address_family, host_resolver_flags,
- addrlist, os_error);
+ if (previous_proc_.get()) {
+ return previous_proc_->Resolve(
+ host, address_family, host_resolver_flags, addrlist, os_error);
}
// Final fallback is the system resolver.
@@ -86,7 +86,7 @@ int HostResolverProc::ResolveUsingPrevious(
}
void HostResolverProc::SetPreviousProc(HostResolverProc* proc) {
- HostResolverProc* current_previous = previous_proc_;
+ HostResolverProc* current_previous = previous_proc_.get();
previous_proc_ = NULL;
// Now that we've guaranteed |this| is the last proc in a chain, we can
// detect potential cycles using GetLastProc().
@@ -102,8 +102,8 @@ HostResolverProc* HostResolverProc::GetLastProc(HostResolverProc* proc) {
if (proc == NULL)
return NULL;
HostResolverProc* last_proc = proc;
- while (last_proc->previous_proc_ != NULL)
- last_proc = last_proc->previous_proc_;
+ while (last_proc->previous_proc_.get() != NULL)
+ last_proc = last_proc->previous_proc_.get();
return last_proc;
}
« no previous file with comments | « net/dns/host_resolver_impl_unittest.cc ('k') | net/dns/mock_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698