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

Unified Diff: net/dns/host_resolver.cc

Issue 238433003: Provide Shill IP Address to myIpAddress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test Created 6 years, 6 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
Index: net/dns/host_resolver.cc
diff --git a/net/dns/host_resolver.cc b/net/dns/host_resolver.cc
index 0435091a54f3d1291c8780ab3b22b0ac90c08236..af471610a78b1caef0b5b30b9e6ce6fb154cdc05 100644
--- a/net/dns/host_resolver.cc
+++ b/net/dns/host_resolver.cc
@@ -24,10 +24,11 @@ namespace {
// that limit this to 6, so we're temporarily holding it at that level.
const size_t kDefaultMaxProcTasks = 6u;
-PrioritizedDispatcher::Limits GetDispatcherLimits(
- const HostResolver::Options& options) {
- PrioritizedDispatcher::Limits limits(NUM_PRIORITIES,
- options.max_concurrent_resolves);
+} // namespace
+
+PrioritizedDispatcher::Limits
+HostResolver::Options::GetDispatcherLimits() const {
+ PrioritizedDispatcher::Limits limits(NUM_PRIORITIES, max_concurrent_resolves);
// If not using default, do not use the field trial.
if (limits.total_jobs != HostResolver::kDefaultParallelism)
@@ -82,8 +83,6 @@ PrioritizedDispatcher::Limits GetDispatcherLimits(
return limits;
}
-} // namespace
-
HostResolver::Options::Options()
: max_concurrent_resolves(kDefaultParallelism),
max_retry_attempts(kDefaultRetryAttempts),
@@ -123,7 +122,7 @@ HostResolver::CreateSystemResolver(const Options& options, NetLog* net_log) {
cache = HostCache::CreateDefaultCache();
return scoped_ptr<HostResolver>(new HostResolverImpl(
cache.Pass(),
- GetDispatcherLimits(options),
+ options.GetDispatcherLimits(),
HostResolverImpl::ProcTaskParams(NULL, options.max_retry_attempts),
net_log));
}

Powered by Google App Engine
This is Rietveld 408576698