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

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

Issue 12334072: Instant: Don't commit unless the page supports Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_overlay.cc
diff --git a/chrome/browser/instant/instant_overlay.cc b/chrome/browser/instant/instant_overlay.cc
index 687b1f6b6587a77b8a88daf6f698f0ca93f62ee6..68029eb354fd4ab1422b9b36d2cfda1fd61eface 100644
--- a/chrome/browser/instant/instant_overlay.cc
+++ b/chrome/browser/instant/instant_overlay.cc
@@ -134,6 +134,22 @@ void InstantOverlay::OnMouseUp() {
content::WebContents* InstantOverlay::OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params) {
+ if (!supports_instant()) {
+ // If the page doesn't yet support Instant, it hasn't fully loaded.
samarth 2013/02/25 17:15:05 If such a utility doesn't exist already, it would
sreeram 2013/02/25 17:48:01 I couldn't find a utility function. I doubt creati
+ // This is a redirect that we should allow. http://crbug.com/177948
+ content::NavigationController::LoadURLParams load_params(params.url);
+ load_params.transition_type = params.transition;
+ load_params.referrer = params.referrer;
+ load_params.extra_headers = params.extra_headers;
+ load_params.is_renderer_initiated = params.is_renderer_initiated;
+ load_params.transferred_global_request_id =
+ params.transferred_global_request_id;
+ load_params.is_cross_site_redirect = params.is_cross_site_redirect;
Shishir 2013/02/25 17:20:03 Shouldn't this always be true here? Maybe dcheck?
sreeram 2013/02/25 17:48:01 I am not entirely sure (I can't say that I've test
+
Shishir 2013/02/25 17:20:03 The WindowDisposition is not being carried over. I
sreeram 2013/02/25 17:48:01 The page may try, but we won't honour it. So, we'l
+ contents()->GetController().LoadURLWithParams(load_params);
samarth 2013/02/25 17:15:05 Does this do the right thing with respect to the i
sreeram 2013/02/25 17:48:01 Yes. The process stuff is handled at a lower level
+ return contents();
+ }
+
// We will allow the navigate to continue if we are able to commit the
// overlay.
//
« 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