Chromium Code Reviews| 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. |
| // |