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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 10553029: Handle interface to prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a build and a unit test leak Created 8 years, 5 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
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 5661042cf2152bfc0ddef10fe34a0b4b5d79c6cc..51282acd5b1248c8b6b3cc489a8f065853135e50 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -1122,18 +1122,13 @@ void OmniboxEditModel::DoPrerender(const AutocompleteMatch& match) {
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());
+ AutocompleteActionPredictorFactory::GetForProfile(profile_)->
+ StartPrerendering(match.destination_url,
+ tab->web_contents()->GetRenderViewHost()->
+ GetSessionStorageNamespace(),
+ container_bounds.size());
}
void OmniboxEditModel::DoPreconnect(const AutocompleteMatch& match) {

Powered by Google App Engine
This is Rietveld 408576698