| 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 5a03ae340327b199b86239b4e4e323f9dcdfba88..5433eaa614d3a6dfe9702972826e6978a34fc503 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -1783,10 +1783,20 @@ bool ChromeContentBrowserClient::AllowServiceWorker(
|
| }
|
| #endif
|
|
|
| + // Check if cookies are allowed
|
| ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
|
| bool allow = io_data->GetCookieSettings()->IsSettingCookieAllowed(
|
| scope, first_party_url);
|
|
|
| + // Check if javascripts are allowed
|
| + content_settings::SettingInfo info;
|
| + std::unique_ptr<base::Value> value =
|
| + io_data->GetHostContentSettingsMap()->GetWebsiteSetting(
|
| + first_party_url, first_party_url, CONTENT_SETTINGS_TYPE_JAVASCRIPT,
|
| + std::string(), &info);
|
| + ContentSetting setting = content_settings::ValueToContentSetting(value.get());
|
| + allow = allow && (setting == CONTENT_SETTING_ALLOW);
|
| +
|
| // Record access to database for potential display in UI.
|
| // Only post the task if this is for a specific frame.
|
| if (render_process_id != -1 && render_frame_id != -1) {
|
|
|