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

Unified Diff: chrome/browser/net/predictor_api.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/predictor_api.h ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_api.cc
===================================================================
--- chrome/browser/net/predictor_api.cc (revision 50795)
+++ chrome/browser/net/predictor_api.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/net/dns_global.h"
+#include "chrome/browser/net/predictor_api.h"
#include <map>
#include <string>
@@ -18,7 +18,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/io_thread.h"
-#include "chrome/browser/net/dns_host_info.h"
+#include "chrome/browser/net/url_info.h"
#include "chrome/browser/net/preconnect.h"
#include "chrome/browser/net/referrer.h"
#include "chrome/browser/pref_service.h"
@@ -306,7 +306,8 @@
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
if (request_info.is_speculative())
return; // One of our own requests.
- DCHECK_NE(0U, request_info.hostname().length());
+ if (!request_info.hostname().length())
+ return; // PAC scripts may create queries without a hostname.
UrlInfo navigation_info;
// TODO(jar): Remove hack which guestimates ssl via port number, and perhaps
@@ -331,6 +332,8 @@
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
if (request_info.is_speculative())
return; // One of our own requests.
+ if (!request_info.hostname().length())
+ return; // PAC scripts may create queries without a hostname.
UrlInfo navigation_info;
size_t startup_count = 0;
{
@@ -370,6 +373,8 @@
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
if (request_info.is_speculative())
return; // One of our own requests.
+ if (!request_info.hostname().length())
+ return; // PAC scripts may create queries without a hostname.
// Remove the entry from |resolutions| that was added by OnStartResolution().
ObservedResolutionMap::iterator it = resolutions_.find(request_id);
« no previous file with comments | « chrome/browser/net/predictor_api.h ('k') | chrome/browser/net/predictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698