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

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

Issue 6353011: net: fix DnsRRResolver on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dnsrr_resolver.h" 5 #include "net/base/dnsrr_resolver.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <resolv.h> 8 #include <resolv.h>
9 #endif 9 #endif
10 10
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 if (jumps == 0) { 493 if (jumps == 0) {
494 p_ = p; 494 p_ = p;
495 len_ = len; 495 len_ = len;
496 } 496 }
497 jumps++; 497 jumps++;
498 498
499 if (offset >= packet_len_) 499 if (offset >= packet_len_)
500 return false; 500 return false;
501 p = &packet_[offset]; 501 p = &packet_[offset];
502 len = packet_len_ - offset;
502 } else if ((d & 0xc0) == 0) { 503 } else if ((d & 0xc0) == 0) {
503 uint8 label_len = d; 504 uint8 label_len = d;
504 if (len < label_len) 505 if (len < label_len)
505 return false; 506 return false;
506 if (name && label_len) { 507 if (name && label_len) {
507 if (!name->empty()) 508 if (!name->empty())
508 name->append("."); 509 name->append(".");
509 name->append(reinterpret_cast<const char*>(p), label_len); 510 name->append(reinterpret_cast<const char*>(p), label_len);
510 } 511 }
511 p += label_len; 512 p += label_len;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 inflight_.erase(j); 810 inflight_.erase(j);
810 811
811 job->HandleResult(result, response); 812 job->HandleResult(result, response);
812 delete job; 813 delete job;
813 } 814 }
814 815
815 } // namespace net 816 } // namespace net
816 817
817 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle); 818 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverHandle);
818 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker); 819 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::RRResolverWorker);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698