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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 11785025: Do not commit InstantLoader server redirects till the page supports instant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Not committing on any load before InstantSupportDetermined. Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 83624cdc549af5c861ee12da890f6847c23813f6..1193a471b6efdf69699492e2b20089dd6bad055c 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -870,6 +870,12 @@ void InstantController::InstantLoaderRenderViewGone() {
}
void InstantController::InstantLoaderAboutToNavigateMainFrame(const GURL& url) {
+ // If the page does not yet support instant, we allow redirects and other
+ // navigations to go through since the instant URL can redirect - e.g. to
+ // country specific pages.
+ if (!loader_->supports_instant())
+ return;
+
GURL instant_url(loader_->instant_url());
// If we are navigating to the instant URL, do nothing.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698