Closed
Bug 722981
Opened 13 years ago
Closed 13 years ago
nsMediaCacheFlusher uses the global Private Browsing status to decide when to flush the media cache
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: jdm, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
The global PB service is going away. We'll probably need to have two separate media caches, since there could be a PB window watching a video and a regular window watching another concurrently.
Reporter | ||
Comment 1•13 years ago
|
||
We can at least clear out the private media cache based on the last-pb-context-destroyed notification in bug 725210.
Depends on: 725210
Reporter | ||
Comment 2•13 years ago
|
||
Robert, what work will be required to allow multiple media caches? I scanned through nsMediaCache for places that use gMediaCache, and it didn't look like a completely straightforward process for someone brand new to the media code.
It's not trivial, but I think it's not hard.
-- Give each nsMediaCacheStream a reference to its nsMediaCache. Make nsMediaCacheStream::Init indicate which cache to use (could just be an enum). Then InitMediaCache would take that enum as a parameter and index into a global array. Or some value of the enum could create a new unique nsMediaCache and add it to the array.
-- Make MaybeShutdown nonstatic.
-- Make nsMediaCacheFlusher iterate through the global array. (Would it still be needed though?)
-- Give each ResourceStreamIterator a reference to its nsMediaCache.
-- Give each UpdateEvent a reference to its nsMediaCache.
Assignee | ||
Comment 4•13 years ago
|
||
OK, so we had talked about this over in bug 572243. To summarize, the media cache does not include the URL to the media resource. The data itself might potentially be used to trace the media item back to its source, but the current approach of clearing the cache when the PB mode is over seems to be sufficient in order to defend against that.
The advantage of separating the media cache into two caches is that when leaving the PB mode, the media cache for non-PB media will not get evicted. I think that's definitely something to strive to do, but it's out of scope for this bug. As far as this bug is concerned, we should just preserve the existing functionality.
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #615606 -
Flags: review?(roc) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Target Milestone: --- → mozilla15
Assignee | ||
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•