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

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

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/media/h264_dpb.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.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/dns_transaction.h" 5 #include "net/dns/dns_transaction.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 // Begins query for the current name. Makes the first attempt. 437 // Begins query for the current name. Makes the first attempt.
438 AttemptResult StartQuery() { 438 AttemptResult StartQuery() {
439 std::string dotted_qname = DNSDomainToString(qnames_.front()); 439 std::string dotted_qname = DNSDomainToString(qnames_.front());
440 net_log_.BeginEvent(NetLog::TYPE_DNS_TRANSACTION_QUERY, 440 net_log_.BeginEvent(NetLog::TYPE_DNS_TRANSACTION_QUERY,
441 NetLog::StringCallback("qname", &dotted_qname)); 441 NetLog::StringCallback("qname", &dotted_qname));
442 442
443 first_server_index_ = session_->NextFirstServerIndex(); 443 first_server_index_ = session_->NextFirstServerIndex();
444 444
445 attempts_.reset(); 445 attempts_.clear();
446 return MakeAttempt(); 446 return MakeAttempt();
447 } 447 }
448 448
449 void OnAttemptComplete(unsigned attempt_number, int rv) { 449 void OnAttemptComplete(unsigned attempt_number, int rv) {
450 if (callback_.is_null()) 450 if (callback_.is_null())
451 return; 451 return;
452 DCHECK_LT(attempt_number, attempts_.size()); 452 DCHECK_LT(attempt_number, attempts_.size());
453 const DnsUDPAttempt* attempt = attempts_[attempt_number]; 453 const DnsUDPAttempt* attempt = attempts_[attempt_number];
454 AttemptResult result = FinishAttempt(AttemptResult(rv, attempt)); 454 AttemptResult result = FinishAttempt(AttemptResult(rv, attempt));
455 if (result.rv != ERR_IO_PENDING) 455 if (result.rv != ERR_IO_PENDING)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } // namespace 579 } // namespace
580 580
581 // static 581 // static
582 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory( 582 scoped_ptr<DnsTransactionFactory> DnsTransactionFactory::CreateFactory(
583 DnsSession* session) { 583 DnsSession* session) {
584 return scoped_ptr<DnsTransactionFactory>( 584 return scoped_ptr<DnsTransactionFactory>(
585 new DnsTransactionFactoryImpl(session)); 585 new DnsTransactionFactoryImpl(session));
586 } 586 }
587 587
588 } // namespace net 588 } // namespace net
589
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_dpb.cc ('k') | net/proxy/dhcp_proxy_script_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698