Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
index b973ebd7e78c27ea313ca4abb6643f88793737dd..ade68eb18e5e567b724be819461c4e0abcddced7 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -1101,21 +1101,19 @@ void OmniboxEditModel::DoPrerender(const AutocompleteMatch& match) { |
// It's possible the tab strip does not have an active tab contents, for |
// instance if the tab has been closed or on return from a sleep state |
// (http://crbug.com/105689) |
- TabContents* tab = controller_->GetTabContents(); |
- if (!tab) |
- return; |
- prerender::PrerenderManager* prerender_manager = |
- prerender::PrerenderManagerFactory::GetForProfile(tab->profile()); |
- if (!prerender_manager) |
- return; |
- content::RenderViewHost* current_host = |
- tab->web_contents()->GetRenderViewHost(); |
- gfx::Rect container_bounds; |
- tab->web_contents()->GetView()->GetContainerBounds(&container_bounds); |
- prerender_manager->AddPrerenderFromOmnibox( |
- match.destination_url, current_host->GetSessionStorageNamespace(), |
- container_bounds.size()); |
+ if (TabContents* tab = controller_->GetTabContents()) { |
+ gfx::Rect container_bounds; |
+ tab->web_contents()->GetView()->GetContainerBounds(&container_bounds); |
+ content::RenderViewHost* current_host = |
+ tab->web_contents()->GetRenderViewHost(); |
+ AutocompleteActionPredictor* action_predictor = |
+ AutocompleteActionPredictorFactory::GetForProfile(profile_); |
+ |
+ action_predictor->StartPrerendering( |
+ match.destination_url, |
+ current_host->GetSessionStorageNamespace(), container_bounds.size()); |
mmenke
2012/07/09 18:06:57
nit: Any reason current_host->GetSessionStorageNa
mmenke
2012/07/09 18:06:57
I'll defer to Dominich on whether it makes sense t
dominich
2012/07/09 18:25:43
This makes sense and was written after discussion
mmenke
2012/07/10 18:01:13
Thanks for the explanation, sounds reasonable. Ju
gavinp
2012/07/11 17:04:00
Done.
|
+ } |
} |
void OmniboxEditModel::DoPreconnect(const AutocompleteMatch& match) { |