Closed
Bug 111049
Opened 24 years ago
Closed 24 years ago
add attribute to nsICacheSession to detect device availability
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: gordon, Assigned: gordon)
Details
Attachments
(2 files)
|
3.00 KB,
patch
|
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
|
3.28 KB,
patch
|
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Hyatt could use a boolean attribute on nsICacheSession to ascertain whether or
not the disk cache is currently enabled. If his cache session is capable of
storing fav icon misses (to prevent needless spam of websites), he will enable
the fav icon feature, otherwise he would like to turn it off.
I don't want to add a specific call to check for each device. I think it makes
more sense to check whatever devices are specified by the storage policy for a
cache session, and return an indication of whether the that session is currently
enabled for storage.
I could use some name suggestions. session->IsStorageEnabled() ?
Comment 1•24 years ago
|
||
how about nsICacheService::IsStorageEnabled(nsCacheStoragePolicy)?
That could work for me, but it would require aquiring or saving a cache service
object. Clients already have to keep a cache session object, and they will
probably really be interested in "is this session usable?", so it seems a bit
more natural to have the method on nsICacheSession. Does this make sense to
you, Darin?
Comment 3•24 years ago
|
||
perhaps it should be in both places...
suppose someone wants to do the test before creating a cache session?
darin & hyatt, could you take a look and let me know what you think. If you
like it, then an r/sr would be great. Otherwise I'll incorporate any feedback
and make another pass at it.
Comment 5•24 years ago
|
||
Why is a lock necessary? Are we worrying that some other thread could be
altering your storage policy? Just curious.
r/sr=hyatt
This is awesome and will enable me to easily disable the favicon support in the
situation where the disk cache is disabled.
Comment 6•24 years ago
|
||
Comment on attachment 59930 [details] [diff] [review]
1st draft of method
r/sr=darin, but you might want to move the gService->mEnableXXXDevice checks
first.
Attachment #59930 -
Flags: superreview+
darin: thanks, I'll do that.
hyatt: it's not the storagePolicy changing, but gService and its members that I
think we should protect.
A new patch coming soon.
Comment 9•24 years ago
|
||
Comment on attachment 64947 [details] [diff] [review]
moved check for enabled device
sr=darin
Attachment #64947 -
Flags: superreview+
| Assignee | ||
Comment 10•24 years ago
|
||
patch checked in. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•