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

Unified Diff: chrome/browser/prerender/prerender_manager.cc

Issue 10918189: Add PrerenderStatusEvent on Prerenders (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase to trunk, remove some unrelated fixes... Created 8 years, 1 month 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/prerender/prerender_manager.h ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.cc
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 31f5ab0b2a4714cc5411749fa80df75504186a57..73d6fb87693bf77e527374db12146d5d04987523 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -228,6 +228,7 @@ void PrerenderManager::Shutdown() {
PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
int process_id,
+ int prerender_id,
int route_id,
const GURL& url,
const content::Referrer& referrer,
@@ -263,8 +264,8 @@ PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
// Instead of prerendering from inside of a running prerender, we will defer
// this request until its launcher is made visible.
if (PrerenderContents* contents = parent_prerender_data->contents_) {
- pending_prerender_list_.push_back(
- linked_ptr<PrerenderData>(new PrerenderData(this)));
+ pending_prerender_list_.push_back(linked_ptr<PrerenderData>(
+ new PrerenderData(this)));
PrerenderHandle* prerender_handle =
new PrerenderHandle(pending_prerender_list_.back().get());
contents->AddPendingPrerender(
@@ -274,7 +275,7 @@ PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
}
}
- return AddPrerender(origin, process_id, url, referrer, size,
+ return AddPrerender(origin, process_id, prerender_id, url, referrer, size,
session_storage_namespace);
#endif
}
@@ -285,7 +286,7 @@ PrerenderHandle* PrerenderManager::AddPrerenderFromOmnibox(
const gfx::Size& size) {
if (!IsOmniboxEnabled(profile_))
return NULL;
- return AddPrerender(ORIGIN_OMNIBOX, -1, url, content::Referrer(), size,
+ return AddPrerender(ORIGIN_OMNIBOX, -1, -1, url, content::Referrer(), size,
session_storage_namespace);
}
@@ -913,7 +914,7 @@ void PrerenderManager::StartPendingPrerender(
DCHECK(process_id == -1 || session_storage_namespace);
scoped_ptr<PrerenderHandle> swap_prerender_handle(AddPrerender(
- origin, process_id, url, referrer, size, session_storage_namespace));
+ origin, process_id, -1, url, referrer, size, session_storage_namespace));
if (swap_prerender_handle.get()) {
// AddPrerender has returned a new prerender handle to us. We want to make
// |existing_prerender_handle| active, so swap the underlying PrerenderData
@@ -986,6 +987,7 @@ void PrerenderManager::DoShutdown() {
PrerenderHandle* PrerenderManager::AddPrerender(
Origin origin,
int process_id,
+ int prerender_id,
const GURL& url_arg,
const content::Referrer& referrer,
const gfx::Size& size,
@@ -1071,7 +1073,7 @@ PrerenderHandle* PrerenderManager::AddPrerender(
gfx::Size contents_size =
size.IsEmpty() ? config_.default_tab_bounds.size() : size;
- prerender_contents->StartPrerendering(process_id, contents_size,
+ prerender_contents->StartPrerendering(process_id, prerender_id, contents_size,
session_storage_namespace,
control_group_behavior);
« no previous file with comments | « chrome/browser/prerender/prerender_manager.h ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698