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

Side by Side Diff: net/base/host_resolver_impl.cc

Issue 8429034: Upstream: Build net_unittests for Android. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix a bug in ssl_client_socket_openssl.cc and address comments Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/host_resolver_impl.h" 5 #include "net/base/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 1084
1085 #if defined(OS_WIN) 1085 #if defined(OS_WIN)
1086 EnsureWinsockInit(); 1086 EnsureWinsockInit();
1087 #endif 1087 #endif
1088 #if defined(OS_POSIX) && !defined(OS_MACOSX) 1088 #if defined(OS_POSIX) && !defined(OS_MACOSX)
1089 if (HaveOnlyLoopbackAddresses()) 1089 if (HaveOnlyLoopbackAddresses())
1090 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; 1090 additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY;
1091 #endif 1091 #endif
1092 NetworkChangeNotifier::AddIPAddressObserver(this); 1092 NetworkChangeNotifier::AddIPAddressObserver(this);
1093 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) 1093 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
1094 #if !defined(OS_ANDROID)
1094 EnsureDnsReloaderInit(); 1095 EnsureDnsReloaderInit();
1096 #endif
1095 NetworkChangeNotifier::AddDNSObserver(this); 1097 NetworkChangeNotifier::AddDNSObserver(this);
1096 #endif 1098 #endif
1097 } 1099 }
1098 1100
1099 HostResolverImpl::~HostResolverImpl() { 1101 HostResolverImpl::~HostResolverImpl() {
1100 // Cancel the outstanding jobs. Those jobs may contain several attached 1102 // Cancel the outstanding jobs. Those jobs may contain several attached
1101 // requests, which will also be cancelled. 1103 // requests, which will also be cancelled.
1102 DiscardIPv6ProbeJob(); 1104 DiscardIPv6ProbeJob();
1103 1105
1104 CancelAllJobs(); 1106 CancelAllJobs();
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 // resolv.conf changes so we don't need to do anything to clear that cache. 1656 // resolv.conf changes so we don't need to do anything to clear that cache.
1655 if (cache_.get()) 1657 if (cache_.get())
1656 cache_->clear(); 1658 cache_->clear();
1657 // Existing jobs will have been sent to the original server so they need to 1659 // Existing jobs will have been sent to the original server so they need to
1658 // be aborted. TODO(Craig): Should these jobs be restarted? 1660 // be aborted. TODO(Craig): Should these jobs be restarted?
1659 AbortAllInProgressJobs(); 1661 AbortAllInProgressJobs();
1660 // |this| may be deleted inside AbortAllInProgressJobs(). 1662 // |this| may be deleted inside AbortAllInProgressJobs().
1661 } 1663 }
1662 1664
1663 } // namespace net 1665 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698