summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/navigation_controller.cc
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 04:50:34 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 04:50:34 +0000
commit4e6419cf5374adda16f97be965b8b7e5b225224f (patch)
tree594ced66460efaedf1071dd7468ba7012d0a6280 /chrome/browser/tab_contents/navigation_controller.cc
parentfc105849740379470c96501032e377668a2f5e7e (diff)
downloadchromium_src-4e6419cf5374adda16f97be965b8b7e5b225224f.zip
chromium_src-4e6419cf5374adda16f97be965b8b7e5b225224f.tar.gz
chromium_src-4e6419cf5374adda16f97be965b8b7e5b225224f.tar.bz2
Introduce all the plumbing for Session Storage. This mostly consists of creating and tracking namespace ids in conjunction with the tabs. This is essentially just a bunch of dead code at the moment, but the next patch will get rid of the old way of generating/cloning IDs (initiated by the renderer) and instead use these IDs.
TEST=none BUG=none Review URL: http://codereview.chromium.org/550017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/navigation_controller.cc')
-rw-r--r--chrome/browser/tab_contents/navigation_controller.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc
index fa4c783..3cbe29c 100644
--- a/chrome/browser/tab_contents/navigation_controller.cc
+++ b/chrome/browser/tab_contents/navigation_controller.cc
@@ -12,6 +12,8 @@
#include "chrome/browser/browser_about_handler.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_url_handler.h"
+#include "chrome/browser/in_process_webkit/dom_storage_context.h"
+#include "chrome/browser/in_process_webkit/webkit_context.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/browser/sessions/session_types.h"
@@ -133,7 +135,9 @@ NavigationController::NavigationController(TabContents* contents,
max_restored_page_id_(-1),
ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)),
needs_reload_(false),
- user_gesture_observed_(false) {
+ user_gesture_observed_(false),
+ session_storage_namespace_id_(profile->GetWebKitContext()->
+ dom_storage_context()->AllocateSessionStorageNamespaceId()) {
DCHECK(profile_);
}
@@ -856,6 +860,10 @@ void NavigationController::CopyStateFrom(const NavigationController& source) {
new NavigationEntry(*source.entries_[i])));
}
+ session_storage_namespace_id_ =
+ profile_->GetWebKitContext()->dom_storage_context()->CloneSessionStorage(
+ source.session_storage_namespace_id_);
+
FinishRestore(source.last_committed_entry_index_, false);
}