Chromium Code Reviews| 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 91907f42b228770a60a4f4fbce2f0b44b2b16ed7..dfbc6e582568a074f254f77d647343fa6ec97eff 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -404,6 +404,25 @@ content::WebContentsView* |
| return NULL; |
| } |
| +std::string ChromeContentBrowserClient::GetStoragePartitionIdForChildProcess( |
| + content::BrowserContext* browser_context, |
| + int child_process_id) { |
| + // In chrome, we use the extension ID as the partition ID. This works well |
| + // because the extension ID fits the partition ID pattern and currently only |
| + // apps can designate that storage should be isolated. |
| + 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()) { |
|
jam
2012/07/11 02:09:25
nit: i thought the convention was just
if (install
awong
2012/07/11 21:17:17
I wasn't aware of a convention, but happy to do it
|
| + return installed_app->id(); |
| + } |
| + } |
| + return std::string(); |
| +} |
| + |
| content::WebContentsViewDelegate* |
| ChromeContentBrowserClient::GetWebContentsViewDelegate( |
| content::WebContents* web_contents) { |