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

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

Issue 8392041: Prerendered tabs use the same SessionStorage namespace as the tab that triggered the prerender. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove check Created 9 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_final_status.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index abd1541dc3366309fcb2b930c7239cea6e598fec..5d2c062ca7205f8080cdc4de198380f55994c529 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -101,8 +101,11 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Adds a prerender for |url| if valid. As the prerender request is coming
// from a source without a RenderViewHost (i.e., the omnibox) we don't have a
// child or route id, or a referrer. This method uses sensible values for
- // those.
- bool AddPrerenderFromOmnibox(const GURL& url);
+ // those. The |session_storage_namespace| matches the namespace of the active
+ // tab at the time the prerender is generated from the omnibox.
+ bool AddPrerenderFromOmnibox(
+ const GURL& url,
+ SessionStorageNamespace* session_storage_namespace);
// Destroy all prerenders for the given child route id pair and assign a final
// status to them.
@@ -245,12 +248,15 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Adds a prerender for |url| from referrer |referrer| initiated from the
// RenderViewHost specified by |child_route_id_pair|. The |origin| specifies
- // how the prerender was added.
+ // how the prerender was added. If the |session_storage_namespace| is NULL,
+ // it is discovered using the RenderViewHost specified by
+ // |child_route_id_pair|.
bool AddPrerender(
Origin origin,
const std::pair<int, int>& child_route_id_pair,
const GURL& url,
- const GURL& referrer);
+ const GURL& referrer,
+ SessionStorageNamespace* session_storage_namespace);
// Adds a pending preload issued by the prerendering RenderView identified by
// |child_route_id_pair|. If and when that prerendering RenderView is used,
@@ -293,10 +299,11 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
void DeleteOldEntries();
virtual base::Time GetCurrentTime() const;
virtual base::TimeTicks GetCurrentTimeTicks() const;
- virtual PrerenderContents* CreatePrerenderContents(const GURL& url,
- const GURL& referrer,
- Origin origin,
- uint8 experiment_id);
+ virtual PrerenderContents* CreatePrerenderContents(
+ const GURL& url,
+ const GURL& referrer,
+ Origin origin,
+ uint8 experiment_id);
// Checks if the PrerenderContents has been added to the pending delete list.
bool IsPendingDelete(PrerenderContents* entry) const;
« no previous file with comments | « chrome/browser/prerender/prerender_final_status.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698