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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10600009: Support partitioning of storage contexts based on render_id. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 8 years, 6 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: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 70f32898b06dc386e2fdd2346f3c0c7f8be6ba60..e85c3b865f1ab3296864deb8896363bdffb412c6 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -404,6 +404,22 @@ content::WebContentsView*
return NULL;
}
+std::string ChromeContentBrowserClient::GetStoragePartitionForChildProcess(
+ content::BrowserContext* browser_context,
+ int child_process_id) {
Charlie Reis 2012/07/02 23:21:23 Let's add a comment explaining that Chrome uses th
awong 2012/07/09 20:37:43 Added...do we need to do any sort of prefixing? l
Charlie Reis 2012/07/10 21:37:48 I don't think prefixing is needed.
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ ExtensionService* extension_service =
+ ExtensionSystem::Get(profile)->extension_service();
+ if (extension_service) {
+ const extensions::Extension* installed_app = extension_service->
+ GetInstalledAppForRenderer(child_process_id);
+ if (installed_app != NULL && installed_app->is_storage_isolated()) {
Charlie Reis 2012/07/02 23:21:23 Is this going to work with browser tags and other
awong 2012/07/09 20:37:43 Cookies and cache should be migrated into the stor
Charlie Reis 2012/07/10 21:37:48 No, Nasko's CL hasn't landed yet. We can unify al
+ return installed_app->id();
+ }
+ }
+ return std::string();
+}
+
content::WebContentsViewDelegate*
ChromeContentBrowserClient::GetWebContentsViewDelegate(
content::WebContents* web_contents) {

Powered by Google App Engine
This is Rietveld 408576698