WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
55267
Add API to enumerate/delete files downloaded for <audio> and <video>
https://bugs.webkit.org/show_bug.cgi?id=55267
Summary
Add API to enumerate/delete files downloaded for <audio> and <video>
Eric Carlson
Reported
2011-02-25 14:54:05 PST
Because some media engines download files for <audio> and <video> directly, we need API so a browser can: 1. Get a list of the origins of all files in the media cache. 2. Delete all files in the media cache. 3. Delete all files in the media cache for a given origin.
Attachments
Proposed patch
(4.80 KB, patch)
2011-02-25 15:45 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Updated patch
(15.76 KB, patch)
2011-03-06 20:21 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Updated patch, with missing comma.
(15.76 KB, patch)
2011-03-06 20:45 PST
,
Eric Carlson
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2011-02-25 14:54:20 PST
<
rdar://problem/9049280
>
Eric Carlson
Comment 2
2011-02-25 15:45:16 PST
Created
attachment 83892
[details]
Proposed patch
Darin Adler
Comment 3
2011-02-25 15:46:33 PST
Comment on
attachment 83892
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=83892&action=review
> Source/WebCore/html/HTMLMediaElement.cpp:2549 > +void HTMLMediaElement::clearMediaCacheForSite(const String site)
Should be const String& rather than just const String.
> Source/WebCore/html/HTMLMediaElement.h:182 > + void clearMediaCacheForSite(const String);
Here too.
> Source/WebCore/platform/graphics/MediaPlayer.cpp:731 > +void MediaPlayer::clearMediaCacheForSite(const String site)
Here too.
> Source/WebCore/platform/graphics/MediaPlayer.h:293 > + void clearMediaCacheForSite(const String);
Should be const String& rather than just const String.
> Source/WebCore/platform/graphics/MediaPlayerPrivate.h:146 > + void clearMediaCacheForSite(const String) { }
Should be const String& rather than just const String.
Eric Carlson
Comment 4
2011-02-25 15:58:19 PST
Oops, landed this when saw the r+ email - which arrived before the one suggesting changes. Will follow up with another check in shortly.
Eric Carlson
Comment 5
2011-02-25 16:39:26 PST
http://trac.webkit.org/changeset/79737
and
http://trac.webkit.org/changeset/79744
Eric Carlson
Comment 6
2011-03-06 20:08:04 PST
This patch wasn't quite right as it requires an instance of HTMLMediaElement and only works with one media engine. Instead, the methods on HTMLMediaElement should be static, and it should work with all installed media engines.
Eric Carlson
Comment 7
2011-03-06 20:21:36 PST
Created
attachment 84916
[details]
Updated patch
WebKit Review Bot
Comment 8
2011-03-06 20:27:25 PST
Attachment 84916
[details]
did not build on chromium: Build output:
http://queues.webkit.org/results/8101418
Eric Carlson
Comment 9
2011-03-06 20:43:08 PST
(In reply to
comment #8
)
>
Attachment 84916
[details]
did not build on chromium: > Build output:
http://queues.webkit.org/results/8101418
Oops, forgot a comma :-(
Eric Carlson
Comment 10
2011-03-06 20:45:49 PST
Created
attachment 84918
[details]
Updated patch, with missing comma.
Darin Adler
Comment 11
2011-03-07 09:52:13 PST
Comment on
attachment 84918
[details]
Updated patch, with missing comma. View in context:
https://bugs.webkit.org/attachment.cgi?id=84918&action=review
> Source/WebCore/platform/graphics/MediaPlayer.cpp:743 > + if (engines.isEmpty()) > + return; > + > + unsigned count = engines.size(); > + for (unsigned ndx = 0; ndx < count; ndx++) { > + if (engines[ndx]->getSitesInMediaCache) > + engines[ndx]->getSitesInMediaCache(sites); > + }
No need for a special case for an empty vector. Should use size_t instead of unsigned. I would name the local variable “size” to echo the name of the function. We normally use “i” rather than “ndx” for this sort of thing. Same comments for the other two functions below.
Eric Carlson
Comment 12
2011-03-07 10:16:55 PST
http://trac.webkit.org/changeset/80473
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug