Bug 141359 - Use ResourceLoadPriority type in the NetworkCache code
Summary: Use ResourceLoadPriority type in the NetworkCache code
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-07 11:10 PST by Chris Dumez
Modified: 2015-02-11 11:30 PST (History)
1 user (show)

See Also:


Attachments
Patch (5.11 KB, patch)
2015-02-07 11:11 PST, Chris Dumez
koivisto: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-02-07 11:10:06 PST
Use ResourceLoadPriority type in the NetworkCache code and rely on ResourceLoadPriorityHighest value instead of hard-coding a new maximumRetrievePriority constant. This seems a bit more robust.
Comment 1 Chris Dumez 2015-02-07 11:11:59 PST
Created attachment 246211 [details]
Patch
Comment 2 Antti Koivisto 2015-02-07 13:32:09 PST
Comment on attachment 246211 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246211&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:148
> -    void retrieve(const NetworkCacheKey&, unsigned priority, RetrieveCompletionHandler&&);
> +    void retrieve(const NetworkCacheKey&, WebCore::ResourceLoadPriority, RetrieveCompletionHandler&&);

While in principle a good idea I'm trying establish a layering where the storage layer does not know anything about resources or related concepts. The way to do this cleanly would be to have NetworkCacheStorage::setMaximumPriority (or constructor argument) and call it from the NetworkCache.