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

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

Issue 2866026: Rename Dns prefetching files to Predictor files... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 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/render_dns_master.h" 8 #include "chrome/renderer/net/renderer_net_predictor.h"
9 9
10 #include <ctype.h> 10 #include <ctype.h>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "chrome/common/net/dns.h" 14 #include "chrome/common/net/predictor_common.h"
15 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
16 #include "chrome/renderer/net/render_dns_queue.h" 16 #include "chrome/renderer/net/predictor_queue.h"
17 #include "chrome/renderer/render_thread.h" 17 #include "chrome/renderer/render_thread.h"
18 18
19 // This API is used in the render process by renderer_glue.cc. 19 // This API is used in the render process by renderer_glue.cc.
20 // IF you are in the render process, you MUST be on the renderer thread to call. 20 // IF you are in the render process, you MUST be on the renderer thread to call.
21 void DnsPrefetchCString(const char* hostname, size_t length) { 21 void DnsPrefetchCString(const char* hostname, size_t length) {
22 RenderThread::current()->Resolve(hostname, length); 22 RenderThread::current()->Resolve(hostname, length);
23 } 23 }
24 24
25 // The number of hostnames submitted to Browser DNS resolver per call to 25 // The number of hostnames submitted to Browser DNS resolver per call to
26 // SubmitHostsnames() (which reads names from our queue). 26 // SubmitHostsnames() (which reads names from our queue).
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // address. 153 // address.
154 bool RendererNetPredictor::is_numeric_ip(const char* name, size_t length) { 154 bool RendererNetPredictor::is_numeric_ip(const char* name, size_t length) {
155 // Scan for a character outside our lookup list. 155 // Scan for a character outside our lookup list.
156 while (length-- > 0) { 156 while (length-- > 0) {
157 if (!isdigit(*name) && '.' != *name) 157 if (!isdigit(*name) && '.' != *name)
158 return false; 158 return false;
159 ++name; 159 ++name;
160 } 160 }
161 return true; 161 return true;
162 } 162 }
OLDNEW
« no previous file with comments | « chrome/renderer/net/renderer_net_predictor.h ('k') | chrome/renderer/net/renderer_predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698