Chromium Code Reviews| Index: chrome/browser/net/predictor_tab_helper.cc |
| diff --git a/chrome/browser/net/predictor_tab_helper.cc b/chrome/browser/net/predictor_tab_helper.cc |
| index a6f59ba2f947eb775eec68ea6fe52e6d787ea772..f3dfc3a09cfc5433050a59612feedbd6ae5009f8 100644 |
| --- a/chrome/browser/net/predictor_tab_helper.cc |
| +++ b/chrome/browser/net/predictor_tab_helper.cc |
| @@ -9,6 +9,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/url_constants.h" |
| +#include "content/public/browser/navigation_handle.h" |
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(chrome_browser_net::PredictorTabHelper); |
| @@ -21,14 +22,15 @@ PredictorTabHelper::PredictorTabHelper(content::WebContents* web_contents) |
| PredictorTabHelper::~PredictorTabHelper() { |
| } |
| -void PredictorTabHelper::DidStartNavigationToPendingEntry( |
| - const GURL& url, |
| - content::NavigationController::ReloadType reload_type) { |
| +void PredictorTabHelper::DidStartNavigation( |
| + content::NavigationHandle* navigation_handle) { |
| Profile* profile = |
| Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
| chrome_browser_net::Predictor* predictor = profile->GetNetworkPredictor(); |
| if (!predictor) |
| return; |
| + |
| + const GURL& url = navigation_handle->GetURL(); |
| if (url.SchemeIs(url::kHttpScheme) || url.SchemeIs(url::kHttpsScheme)) |
|
mmenke
2016/03/17 18:52:15
While we're here, maybe get rid of url local, and
Charlie Harrison
2016/03/17 21:22:41
ACK
|
| predictor->PreconnectUrlAndSubresources(url, GURL()); |
| } |