New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 808690 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug

Blocking:
issue 641132



Sign in to add a comment

Media Licenses don't show up in the "All cookies and site data" settings page

Project Member Reported by jrumm...@chromium.org, Feb 2 2018

Issue description

Chrome 64.0.3282.119

If I look at the advanced dialog for clearing browsing data (chrome://settings/clearBrowserData), it notes:

Media licenses
You may lose access to protected content from ats.wv.sandbox.google.com and some other sites.

However, going to the "All cookies and site data" page, (chrome://settings/siteData), ats.wv.sandbox.google.com isn't in the list. Even searching for "sandbox" or "google" doesn't list it.

Also tried this for netflix.com. It does show up in the "All cookies and site data" list, but does not show a "Media License" entry.

www.netflix.com
1 cookie, File system, Database storage, Local storage

netflix.com
7 cookies

secured.netflix.com
1 cookie, Local storage

"Media license" should appear in the entry for www.netflix.com.
 
Labels: Needs-Triage-M64
Blocking: 641132
Cc: hbengali@chromium.org xhw...@chromium.org rkuroiwa@chromium.org
Labels: -Pri-3 -Needs-Triage-M64 FoundIn-64 M-67 Pri-1
Owner: jrumm...@chromium.org
Status: Assigned (was: Available)
It would be great if we can add some test to cover this, otherwise it could be broken again in the future.
Labels: -M-67 M-68
This bug has a stale milestone. Please close appropriately, update the milestone and set P1/P2, or drop the milestone and set as P3. I'll automatically punt these issues to M70 next week otherwise.
Labels: -M-68 M-70
Just checked with Netflix on M67 stable. No media licenses show up in the chrome://settings/cookies/detail?site=www.netflix.com list. Something is listed as "File System", but expanding it shows:
  Origin
    https://www.netflix.com/
  Persistent storage
    None
  Temporary storage
    0 B

chrome://settings/clearBrowserData (advanced tab) does state "You may lose access to protected content from ats.wv.sandbox.google.com and some other sites." Checking chrome://settings/cookies/detail?site=ats.sandbox.google.com does show "Database Storage" of 1,377 B, so it may be showing up incorrectly.

However, clearing the "Database Storage" for ats.sandbox.google.com did not change the message in the CBD dialog. Even checked after restarting the browser in case the message is cached.

Labels: -Pri-1 Pri-2
Making sure clearing "Media Licenses" still clear CDM storage files is P1. (jrummell: Could you please help double check? Or do we have a test covering this?)

Get "Media Licenses" showing up in "All cookies and site data" settings page can be a P2.
Cc: dullweber@chromium.org
After more investigation, the issue has to do with searching. If I simply look at chrome://settings/siteData and scroll to the appropriate entry, "Media License" is listed. However, if I "search cookies" for the site, "Media License" disappears. Clearing the search entry doesn't make it come back. I have to go back to chrome://settings/content/cookies, and then click "See all cookies and site data" again (and if the search entry hasn't been cleared, "Media licenses" is still missing).
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bc75d7b2cc3da07cf0fe57a22c829f2ef128644

commit 1bc75d7b2cc3da07cf0fe57a22c829f2ef128644
Author: John Rummell <jrummell@chromium.org>
Date: Wed Aug 29 18:17:46 2018

Add additional CookieTree nodes when updating with a filter

When users apply a filter on chrome://settings/siteData, MediaLicenses and
FlashLSO nodes where not added to the cookie tree, so they are not displayed.
This CL adds them back in.

BUG=808690
TEST=tested locally with sites that save Media Licenses

Change-Id: Ibef359a2c9bdf02c2a59864e8e6232d2953000a8
Reviewed-on: https://chromium-review.googlesource.com/1171595
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587197}
[modify] https://crrev.com/1bc75d7b2cc3da07cf0fe57a22c829f2ef128644/chrome/browser/browsing_data/cookies_tree_model.cc
[modify] https://crrev.com/1bc75d7b2cc3da07cf0fe57a22c829f2ef128644/chrome/browser/browsing_data/cookies_tree_model_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8817f77a3271531c0b3320abccd13bf5de0901d2

commit 8817f77a3271531c0b3320abccd13bf5de0901d2
Author: John Rummell <jrummell@chromium.org>
Date: Fri Aug 31 18:12:59 2018

Update BrowsingDataRemoverBrowserTest to include MediaLicenses

MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
External Clear Key CDM to store the license in the file system, if it is
available.

BUG= 843995 ,808690
TEST=new browser_tests pass

Change-Id: Ib4019e6357f04ec6005cfda039ab81c06ab022b5
Reviewed-on: https://chromium-review.googlesource.com/1170175
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588090}
[modify] https://crrev.com/8817f77a3271531c0b3320abccd13bf5de0901d2/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[add] https://crrev.com/8817f77a3271531c0b3320abccd13bf5de0901d2/content/test/data/browsing_data/media_license.html

Status: Fixed (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72f2d4cd06bcaaad1a8f91a9b7b5559ecf70b8d9

commit 72f2d4cd06bcaaad1a8f91a9b7b5559ecf70b8d9
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date: Mon Sep 03 10:29:48 2018

Revert "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"

This reverts commit 8817f77a3271531c0b3320abccd13bf5de0901d2.

Reason for revert: Flaky on Mac ( https://crbug.com/879812 ).

Original change's description:
> Update BrowsingDataRemoverBrowserTest to include MediaLicenses
> 
> MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> External Clear Key CDM to store the license in the file system, if it is
> available.
> 
> BUG= 843995 ,808690
> TEST=new browser_tests pass
> 
> Change-Id: Ib4019e6357f04ec6005cfda039ab81c06ab022b5
> Reviewed-on: https://chromium-review.googlesource.com/1170175
> Commit-Queue: John Rummell <jrummell@chromium.org>
> Reviewed-by: Martin Šrámek <msramek@chromium.org>
> Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#588090}

TBR=xhwang@chromium.org,jrummell@chromium.org,msramek@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  843995 , 808690
Change-Id: I9eefaabb06b959e5f4abbbc92c73777bf3951b14
Reviewed-on: https://chromium-review.googlesource.com/1201851
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588367}
[modify] https://crrev.com/72f2d4cd06bcaaad1a8f91a9b7b5559ecf70b8d9/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[delete] https://crrev.com/7421e54c4f52523bd9e330f331048a5951805b82/content/test/data/browsing_data/media_license.html

Status: Assigned (was: Fixed)
Reactivating this bug as the testing CL got reverted. Will try to reland the test changes.
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45a0df8f9f8fd9e4e8a1d4fbee883bca96639eb7

commit 45a0df8f9f8fd9e4e8a1d4fbee883bca96639eb7
Author: John Rummell <jrummell@chromium.org>
Date: Tue Nov 20 18:28:31 2018

Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"

Original change's description:
> MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> External Clear Key CDM to store the license in the file system, if it is
> available.
>

This reverts commit 72f2d4cd06bcaaad1a8f91a9b7b5559ecf70b8d9.

BUG=808690, 879812 
TEST=new browser_tests pass

Change-Id: Ie9e9229fc85244eed922d93dce82cb3fa09bbe5c
Reviewed-on: https://chromium-review.googlesource.com/c/1342779
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609752}
[modify] https://crrev.com/45a0df8f9f8fd9e4e8a1d4fbee883bca96639eb7/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[add] https://crrev.com/45a0df8f9f8fd9e4e8a1d4fbee883bca96639eb7/content/test/data/browsing_data/media_license.html

Project Member

Comment 15 by bugdroid1@chromium.org, Nov 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9fc38c7b46443cb953b7676fe0f4e82c3d9c0dc

commit e9fc38c7b46443cb953b7676fe0f4e82c3d9c0dc
Author: John Rummell <jrummell@chromium.org>
Date: Tue Nov 20 20:49:47 2018

Revert "Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses""

This reverts commit 45a0df8f9f8fd9e4e8a1d4fbee883bca96639eb7.

Reason for revert: Mac tests flaky, due to filesystem storing time in second increments only.

Original change's description:
> Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"
> 
> Original change's description:
> > MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> > BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> > External Clear Key CDM to store the license in the file system, if it is
> > available.
> >
> 
> This reverts commit 72f2d4cd06bcaaad1a8f91a9b7b5559ecf70b8d9.
> 
> BUG=808690, 879812 
> TEST=new browser_tests pass
> 
> Change-Id: Ie9e9229fc85244eed922d93dce82cb3fa09bbe5c
> Reviewed-on: https://chromium-review.googlesource.com/c/1342779
> Reviewed-by: Christian Dullweber <dullweber@chromium.org>
> Commit-Queue: John Rummell <jrummell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#609752}

TBR=jrummell@chromium.org,dullweber@chromium.org

Change-Id: I1c49014959d10fb9eb2306af0f71cb724ef40070
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 808690,  879812 
Reviewed-on: https://chromium-review.googlesource.com/c/1344884
Reviewed-by: John Rummell <jrummell@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609790}
[modify] https://crrev.com/e9fc38c7b46443cb953b7676fe0f4e82c3d9c0dc/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[delete] https://crrev.com/622c02f9a7e9fe8d55bab94de43b3dab30b8b9b8/content/test/data/browsing_data/media_license.html

Project Member

Comment 16 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4831e9b528dba6992024d0f2242f3b1bad07f9a

commit a4831e9b528dba6992024d0f2242f3b1bad07f9a
Author: John Rummell <jrummell@chromium.org>
Date: Wed Nov 21 21:10:00 2018

Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"

Original change's description:
> MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> External Clear Key CDM to store the license in the file system, if it is
> available.

This reverts commit e9fc38c7b46443cb953b7676fe0f4e82c3d9c0dc.

The original CL was flaky due to Mac's only saving file timestamps to
second granularity. As a result it was possible for the newly created license
to be saved with a timestamp prior to the current actual time, and deleting
"old" licenses would include it in the deletion. Change is to wait for some
time on Macs only to ensure that the "new" license has a later timestamp.

BUG=808690, 879812 
TEST=new browser_tests pass

Change-Id: Ibd7cf65b468f98af9aa583d3f320e54c8f3f223e
Reviewed-on: https://chromium-review.googlesource.com/c/1345248
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610211}
[modify] https://crrev.com/a4831e9b528dba6992024d0f2242f3b1bad07f9a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[add] https://crrev.com/a4831e9b528dba6992024d0f2242f3b1bad07f9a/content/test/data/browsing_data/media_license.html

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6bfa2b7f9065773ba9df3b492e4cc5559e4e785

commit b6bfa2b7f9065773ba9df3b492e4cc5559e4e785
Author: Christian Dullweber <dullweber@chromium.org>
Date: Thu Nov 22 10:42:47 2018

Revert "Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses""

This reverts commit a4831e9b528dba6992024d0f2242f3b1bad07f9a.

Reason for revert: still flaky :(

Original change's description:
> Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"
> 
> Original change's description:
> > MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> > BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> > External Clear Key CDM to store the license in the file system, if it is
> > available.
> 
> This reverts commit e9fc38c7b46443cb953b7676fe0f4e82c3d9c0dc.
> 
> The original CL was flaky due to Mac's only saving file timestamps to
> second granularity. As a result it was possible for the newly created license
> to be saved with a timestamp prior to the current actual time, and deleting
> "old" licenses would include it in the deletion. Change is to wait for some
> time on Macs only to ensure that the "new" license has a later timestamp.
> 
> BUG=808690, 879812 
> TEST=new browser_tests pass
> 
> Change-Id: Ibd7cf65b468f98af9aa583d3f320e54c8f3f223e
> Reviewed-on: https://chromium-review.googlesource.com/c/1345248
> Reviewed-by: Christian Dullweber <dullweber@chromium.org>
> Commit-Queue: John Rummell <jrummell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#610211}

TBR=jrummell@chromium.org,dullweber@chromium.org

Change-Id: I31ee32ae7bb490ce799c92244f352e5a9a627552
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 808690,  879812 ,  907799 
Reviewed-on: https://chromium-review.googlesource.com/c/1347367
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610369}
[modify] https://crrev.com/b6bfa2b7f9065773ba9df3b492e4cc5559e4e785/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[delete] https://crrev.com/ea9f7c1f73dbe189791ad403b351540620d4ef8b/content/test/data/browsing_data/media_license.html

From the latest flakiness bug ( issue 907799 ):
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.13%20Tests/6883

    MediaLicenseTimedDeletion starting @ 2018-11-22 06:30:21.496 UTC
    Found 1 licenses.
    2018-11-22 06:27:24.000 UTC
    // Add new license
    Found 2 licenses.
    2018-11-22 06:27:24.000 UTC
    2018-11-22 06:30:22.000 UTC
    // Delete licenses before 06:30:21.496
    Found 0 licenses.
    Failure: GetMediaLicenseCount() == 0, expected 1

06:30:22.000 > 06:30:21.496, so it's not clear why the new license was deleted.
On my Mac enabled more tracing. When the PluginPrivateDataByOriginChecker (which does the deletion) checks for files, it finds 2 files in each directory. Example:
[25586:42499:1127/145702.632711:VERBOSE3:plugin_private_storage_helper.cc(220)] OnFileInfo name: unknown, size: 0, modified: 2018-11-27 22:57:01.560 UTC
[25586:42499:1127/145702.632968:VERBOSE3:plugin_private_storage_helper.cc(220)] OnFileInfo name: AAB5BD2A01000000, size: 112, modified: 2018-11-27 22:57:02.609 UTC

The "unknown" file is closer to the test start time (2018-11-27 22:57:00.874). My guess is that this is the directory creation time.

So the problem is that there are 2 files in each directory (in addition to the Mac's saving timestamps with second granularity rather than millisecond). The code in BrowsingDataMediaLicenseHelperImpl simply returns the latest time of any file found for the domain. PluginPrivateDataByOriginChecker checks for any file in the time range selected for deleting.

Since Clear Browsing Data always deletes "last hour", "last day", etc. the test should probably switch to delete the newest license first, then delete the old license. Currently it attempts to delete the old license first, which on Mac's with system granularity, sometimes picks up the new license due to the directory creation time. The alternative is to move the Thread.sleep() to the start of the test, which may keep the directory creation time out of the time range to be deleted.
Did more investigation. It turns out that the cdm::FileIO interface ends up creating an empty file when the CDM checks for a file that doesn't exist (issue 909829 opened to get that fixed). The code in media_license.html to check if a media license exists is calling load("unknown"), which creates a 0-length file with the name "unknown" (will update the test with a better name). As the test to make sure that there was no existing license was run before the delay, it created a file that ends up before the test start time (on Macs with file timestamps of only second granularity). So simply moving up the delay should fix the issue. However, I'll also do the last part of #19 to more closely match what Clear Browsing Data does.
Project Member

Comment 21 by bugdroid1@chromium.org, Nov 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9efc6c3effbc8a5d1cb2a88ed4af36fe30241b72

commit 9efc6c3effbc8a5d1cb2a88ed4af36fe30241b72
Author: John Rummell <jrummell@chromium.org>
Date: Thu Nov 29 19:14:18 2018

Reland "Update BrowsingDataRemoverBrowserTest to include MediaLicenses"

Original change's description:
> MediaLicenses can be cleared from the ClearBrowsingData dialog, so update the
> BrowsingDataRemoverBrowserTest to check them as well. This uses the test-only
> External Clear Key CDM to store the license in the file system, if it is
> available.
>
> The original CL was flaky due to Mac's only saving file timestamps to
> second granularity. As a result it was possible for the newly created license
> to be saved with a timestamp prior to the current actual time, and deleting
> "old" licenses would include it in the deletion. Change is to wait for some
> time on Macs only to ensure that the "new" license has a later timestamp.

This reverts commit b6bfa2b7f9065773ba9df3b492e4cc5559e4e785.

BUG=808690
TEST=new browser_tests pass

Change-Id: Iad919ec23bf157a9bc4af3e6d54af2b28fdc217e
Reviewed-on: https://chromium-review.googlesource.com/c/1354498
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612301}
[modify] https://crrev.com/9efc6c3effbc8a5d1cb2a88ed4af36fe30241b72/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
[add] https://crrev.com/9efc6c3effbc8a5d1cb2a88ed4af36fe30241b72/content/test/data/browsing_data/media_license.html

Sign in to add a comment