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

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: 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 | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_loader.h » ('j') | 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..f0b8db415a519ff1859ea311a80f8b27e7844562 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -869,9 +869,16 @@ void InstantController::InstantLoaderRenderViewGone() {
CreateDefaultLoader();
}
-void InstantController::InstantLoaderAboutToNavigateMainFrame(const GURL& url) {
+void InstantController::InstantLoaderAboutToNavigateMainFrame(
+ const GURL& url,
+ bool is_server_redirect) {
GURL instant_url(loader_->instant_url());
+ // If the page does not yet support instant, we allow redirects to go through
+ // since the instant URL can redirect - e.g. to country specific pages.
+ if (!loader_->supports_instant() && is_server_redirect)
+ return;
sreeram 2013/01/08 00:50:03 Put this before the GURL declaration above, so we
Shishir 2013/01/08 01:01:12 Forgot that the instant page had to call show to s
+
// If we are navigating to the instant URL, do nothing.
if (url == instant_url)
return;
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698