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 e3fb74583388c20305aa42c789b44905fffa4ff9..fa6961f9af154b276db4684987566bebc1aa7e3c 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -491,6 +491,9 @@ std::string ChromeContentBrowserClient::GetStoragePartitionIdForChildProcess( |
| std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( |
| content::BrowserContext* browser_context, |
| const GURL& site) { |
| + if (site.SchemeIs(chrome::kGuestScheme)) |
| + return "guest-" + site.host(); |
| + |
| const Extension* extension = NULL; |
| Profile* profile = Profile::FromBrowserContext(browser_context); |
| ExtensionService* extension_service = |
| @@ -1603,10 +1606,14 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs( |
| chrome::ViewType view_type = chrome::GetViewType(web_contents); |
| ExtensionService* service = profile->GetExtensionService(); |
| if (service) { |
| - const Extension* extension = service->extensions()->GetByID( |
| - rvh->GetSiteInstance()->GetSiteURL().host()); |
| - extension_webkit_preferences::SetPreferences( |
| - extension, view_type, web_prefs); |
| + const GURL& url = rvh->GetSiteInstance()->GetSiteURL(); |
| + const Extension* extension = service->extensions()->GetByID(url.host()); |
| + // Guests are not extensions, so they should not be given any extra |
| + // privileges. |
| + if (!url.SchemeIs(chrome::kGuestScheme)) { |
|
awong
2012/10/27 00:10:52
Should this be whitelist instead? SchemeIs(chrome
nasko
2012/10/27 00:28:12
Since this is very rushed CL, I'd rather be more d
|
| + extension_webkit_preferences::SetPreferences( |
| + extension, view_type, web_prefs); |
| + } |
| } |
| if (content::IsForceCompositingModeEnabled()) |