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

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

Issue 2214693002: First step to remove SingleRequestHostResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single Created 4 years, 4 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 (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/host_resolver_impl.h" 5 #include "net/dns/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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 KillDnsTask(); 1312 KillDnsTask();
1313 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB, 1313 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB,
1314 ERR_ABORTED); 1314 ERR_ABORTED);
1315 } else if (is_queued()) { 1315 } else if (is_queued()) {
1316 // |resolver_| was destroyed without running this Job. 1316 // |resolver_| was destroyed without running this Job.
1317 // TODO(szym): is there any benefit in having this distinction? 1317 // TODO(szym): is there any benefit in having this distinction?
1318 net_log_.AddEvent(NetLog::TYPE_CANCELLED); 1318 net_log_.AddEvent(NetLog::TYPE_CANCELLED);
1319 net_log_.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB); 1319 net_log_.EndEvent(NetLog::TYPE_HOST_RESOLVER_IMPL_JOB);
1320 } 1320 }
1321 // else CompleteRequests logged EndEvent. 1321 // else CompleteRequests logged EndEvent.
1322
1323 if (!requests_.empty()) { 1322 if (!requests_.empty()) {
1324 // Log any remaining Requests as cancelled. 1323 // Log any remaining Requests as cancelled.
1325 for (RequestImpl* req : requests_) { 1324 for (RequestImpl* req : requests_) {
1326 DCHECK_EQ(this, req->job()); 1325 DCHECK_EQ(this, req->job());
1326 LogCancelRequest(req->source_net_log(), req->info());
1327 req->OnJobCancelled(this); 1327 req->OnJobCancelled(this);
1328 LogCancelRequest(req->source_net_log(), req->info());
1329 } 1328 }
1330 requests_.clear(); 1329 requests_.clear();
1331 } 1330 }
1332 } 1331 }
1333 1332
1334 // Add this job to the dispatcher. If "at_head" is true, adds at the front 1333 // Add this job to the dispatcher. If "at_head" is true, adds at the front
1335 // of the queue. 1334 // of the queue.
1336 void Schedule(bool at_head) { 1335 void Schedule(bool at_head) {
1337 DCHECK(!is_queued()); 1336 DCHECK(!is_queued());
1338 PrioritizedDispatcher::Handle handle; 1337 PrioritizedDispatcher::Handle handle;
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 if (job_) 2608 if (job_)
2610 job_->CancelRequest(this); 2609 job_->CancelRequest(this);
2611 } 2610 }
2612 2611
2613 void HostResolverImpl::RequestImpl::ChangeRequestPriority( 2612 void HostResolverImpl::RequestImpl::ChangeRequestPriority(
2614 RequestPriority priority) { 2613 RequestPriority priority) {
2615 job_->ChangeRequestPriority(this, priority); 2614 job_->ChangeRequestPriority(this, priority);
2616 } 2615 }
2617 2616
2618 } // namespace net 2617 } // namespace net
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc ('k') | net/ftp/ftp_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698