| 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 c947e54ede641cab653cb9e3aa70842a44e3abcd..c6e59f549879895a39ee9cae803d997d39195edc 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -1475,11 +1475,23 @@ bool ChromeContentBrowserClient::AllowAppCache(
|
| bool ChromeContentBrowserClient::AllowServiceWorker(
|
| const GURL& scope,
|
| const GURL& first_party_url,
|
| - content::ResourceContext* context) {
|
| + content::ResourceContext* context,
|
| + int render_process_id,
|
| + int render_frame_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| + DCHECK(scope.is_valid());
|
| + DCHECK(first_party_url.is_valid());
|
| +
|
| ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
|
| - return io_data->GetCookieSettings()->
|
| - IsSettingCookieAllowed(scope, first_party_url);
|
| + bool allow = io_data->GetCookieSettings()->IsSettingCookieAllowed(
|
| + scope, first_party_url);
|
| +
|
| + // Record access to database for potential display in UI.
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&TabSpecificContentSettings::ServiceWorkerAccessed,
|
| + render_process_id, render_frame_id, scope, !allow));
|
| + return allow;
|
| }
|
|
|
| bool ChromeContentBrowserClient::AllowGetCookie(
|
|
|