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

Side by Side Diff: chrome/renderer/net/renderer_net_predictor.cc

Issue 7631063: Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 // See header file for description of RendererNetPredictor class 5 // See header file for description of RendererNetPredictor class
6 6
7 7
8 #include "chrome/renderer/net/renderer_net_predictor.h" 8 #include "chrome/renderer/net/renderer_net_predictor.h"
9 9
10 #include <ctype.h> 10 #include <ctype.h>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 names.push_back(it->first); 135 names.push_back(it->first);
136 if (0 == max_count) continue; // Get all, independent of count. 136 if (0 == max_count) continue; // Get all, independent of count.
137 if (1 == max_count) break; 137 if (1 == max_count) break;
138 --max_count; 138 --max_count;
139 DCHECK_GE(max_count, 1u); 139 DCHECK_GE(max_count, 1u);
140 } 140 }
141 } 141 }
142 DCHECK_GE(new_name_count_, names.size()); 142 DCHECK_GE(new_name_count_, names.size());
143 new_name_count_ -= names.size(); 143 new_name_count_ -= names.size();
144 144
145 RenderThread::current()->Send(new ViewHostMsg_DnsPrefetch(names)); 145 RenderThread::current()->Send(new ChromeViewHostMsg_DnsPrefetch(names));
146 } 146 }
147 147
148 // is_numeric_ip() checks to see if all characters in name are either numeric, 148 // is_numeric_ip() checks to see if all characters in name are either numeric,
149 // or dots. Such a name will not actually be passed to DNS, as it is an IP 149 // or dots. Such a name will not actually be passed to DNS, as it is an IP
150 // address. 150 // address.
151 bool RendererNetPredictor::is_numeric_ip(const char* name, size_t length) { 151 bool RendererNetPredictor::is_numeric_ip(const char* name, size_t length) {
152 // Scan for a character outside our lookup list. 152 // Scan for a character outside our lookup list.
153 while (length-- > 0) { 153 while (length-- > 0) {
154 if (!isdigit(*name) && '.' != *name) 154 if (!isdigit(*name) && '.' != *name)
155 return false; 155 return false;
156 ++name; 156 ++name;
157 } 157 }
158 return true; 158 return true;
159 } 159 }
OLDNEW
« no previous file with comments | « chrome/renderer/external_host_bindings.cc ('k') | chrome/renderer/prerender/prerender_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698