summaryrefslogtreecommitdiffstats
path: root/content/public/browser/content_browser_client.h
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 21:27:44 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 21:27:44 +0000
commitd7c7c98acae8978ab65c00b403e538cd7719ddb0 (patch)
treefe09c0b57954aa503154ebe71dad354e50d0abf6 /content/public/browser/content_browser_client.h
parentfb29e6cfbf74a41c684d2196d9a8f75dd720ee6c (diff)
downloadchromium_src-d7c7c98acae8978ab65c00b403e538cd7719ddb0.zip
chromium_src-d7c7c98acae8978ab65c00b403e538cd7719ddb0.tar.gz
chromium_src-d7c7c98acae8978ab65c00b403e538cd7719ddb0.tar.bz2
Support partitioning of storage contexts based on render_id.
This modifies BrowserContext to support having multiple storage partitions based on the child process id. The embedder is given a function that allows it to map a child process id into different storage buckets. R=creis,nasko,jam TBR=marja BUG=85121 TEST=add an isolated app that covers a path like http://www.example.com/isolated/. On that page, add an entry to local storage. Access another page on www.example.com that is not isolated. Check that it cannot see the previously set entry. Repeat test in the reverse direction. Review URL: https://chromiumcodereview.appspot.com/10600009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/content_browser_client.h')
-rw-r--r--content/public/browser/content_browser_client.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index d4030c7..9fb5a4d 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -239,13 +239,26 @@ class CONTENT_EXPORT ContentBrowserClient {
ResourceContext* context,
const std::vector<std::pair<int, int> >& render_views);
- // Allows the embedder to override the request context based on the URL for
+ // Allow the embedder to override the request context based on the URL for
// certain operations, like cookie access. Returns NULL to indicate the
// regular request context should be used.
// This is called on the IO thread.
virtual net::URLRequestContext* OverrideRequestContextForURL(
const GURL& url, ResourceContext* context);
+ // Allow the embedder to specify storage parititon id associated with a child
+ // process.
+ //
+ // Child processes that have different storage partition identifiers will
+ // behave as if they belong to different web browsers and not be able to
+ // access each other's cookies, local storage, etc. IDs must only fit the
+ // pattern [a-z0-9]* (lowercase letters or digits).
+ //
+ // Returns the empty string for the regular storage partition.
+ virtual std::string GetStoragePartitionIdForChildProcess(
+ content::BrowserContext* browser_context,
+ int child_process_id);
+
// Create and return a new quota permission context.
virtual QuotaPermissionContext* CreateQuotaPermissionContext();