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

Unified Diff: chrome/browser/net/predictor_tab_helper.cc

Issue 1813553004: Change net's predictor_tab_helper to use the new content Navigation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_tab_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « chrome/browser/net/predictor_tab_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698