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

Unified Diff: chrome/browser/tab_contents/navigation_controller.h

Issue 3325012: Fix SessionStorage (Closed)
Patch Set: kill the last (new) dcheck Created 10 years, 3 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
« no previous file with comments | « chrome/browser/tab_contents/match_preview.cc ('k') | chrome/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/navigation_controller.h
diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h
index ff1a5a0e429e489a9958b46bb6926753f15644dc..99f04f7af704440e028420015a68b9dc473d15d7 100644
--- a/chrome/browser/tab_contents/navigation_controller.h
+++ b/chrome/browser/tab_contents/navigation_controller.h
@@ -21,6 +21,7 @@
class NavigationEntry;
class Profile;
+class SessionStorageNamespace;
class SiteInstance;
class TabContents;
class TabNavigation;
@@ -137,7 +138,13 @@ class NavigationController {
// ---------------------------------------------------------------------------
- NavigationController(TabContents* tab_contents, Profile* profile);
+ // The session storage namespace parameter allows multiple render views and
+ // tab contentses to share the same session storage (part of the WebStorage
+ // spec) space. Passing in NULL simply allocates a new one which is often the
+ // correct thing to do (especially in tests.
+ NavigationController(TabContents* tab_contents,
+ Profile* profile,
+ SessionStorageNamespace* session_storage_namespace);
~NavigationController();
// Returns the profile for this controller. It can never be NULL.
@@ -390,9 +397,9 @@ class NavigationController {
// if it was restored from a previous session. (-1 otherwise)
int32 max_restored_page_id() const { return max_restored_page_id_; }
- // The session storage namespace id that all child render views should use.
- int64 session_storage_namespace_id() const {
- return session_storage_namespace_id_;
+ // The session storage namespace that all child render views should use.
+ SessionStorageNamespace* session_storage_namespace() const {
+ return session_storage_namespace_;
}
// Disables checking for a repost and prompting the user. This is used during
@@ -583,7 +590,7 @@ class NavigationController {
base::TimeTicks last_document_loaded_;
// The session storage id that any (indirectly) owned RenderView should use.
- int64 session_storage_namespace_id_;
+ scoped_refptr<SessionStorageNamespace> session_storage_namespace_;
// Should Reload check for post data? The default is true, but is set to false
// when testing.
« no previous file with comments | « chrome/browser/tab_contents/match_preview.cc ('k') | chrome/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698