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

Unified Diff: content/public/browser/navigation_controller.h

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix content shell 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: content/public/browser/navigation_controller.h
diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h
index 4932ba0f0a155612446fe43ad9f53fcccf95a4bf..e0448f7be6705f047e797dcffefaebe3febbb683 100644
--- a/content/public/browser/navigation_controller.h
+++ b/content/public/browser/navigation_controller.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
#define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
+#include <map>
#include <string>
#include <vector>
#include "base/string16.h"
+#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/common/page_transition_types.h"
@@ -23,6 +25,10 @@ class SessionStorageNamespace;
class WebContents;
struct Referrer;
+// Used to store the mapping of a StoragePartion id to SessionStorageNamespace.
Charlie Reis 2012/08/02 23:06:47 StoragePartition
awong 2012/08/03 00:31:04 Done.
+typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> >
+ SessionStorageNamespaceMap;
Charlie Reis 2012/08/02 23:06:47 Topic for discussion: would it be better for this
awong 2012/08/03 00:31:04 General rule is not to go to large lengths to avoi
+
// A NavigationController maintains the back-forward list for a WebContents and
// manages all navigation within that list.
//
@@ -227,8 +233,15 @@ class NavigationController {
// Random --------------------------------------------------------------------
- // The session storage namespace that all child render views should use.
- virtual SessionStorageNamespace* GetSessionStorageNamespace() const = 0;
+ // The session storage namespace that all child render views of a renderer
Charlie Reis 2012/08/02 23:06:47 nits: all child RenderViews in the renderer proces
awong 2012/08/03 00:31:04 Done.
+ // for the given renderer_id should use.
+ virtual SessionStorageNamespace* GetSessionStorageNamespace(
+ int renderer_id) = 0;
+
+ // Returns all the SessionStorageNamespace objects that this
+ // NavigationController knows about.
+ virtual const SessionStorageNamespaceMap&
+ GetSessionStorageNamespaceMap() const = 0;
// Sets the max restored page ID this NavigationController has seen, if it
// was restored from a previous session.

Powered by Google App Engine
This is Rietveld 408576698