| 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);
|
|
|