Bug 185984 - Minor ApplicationCacheStorage clean up
Summary: Minor ApplicationCacheStorage clean up
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-25 09:32 PDT by Chris Dumez
Modified: 2018-05-25 11:41 PDT (History)
9 users (show)

See Also:


Attachments
Patch (15.45 KB, patch)
2018-05-25 09:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.23 KB, patch)
2018-05-25 10:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-05-25 09:32:13 PDT
Minor ApplicationCacheStorage clean up.
Comment 1 Chris Dumez 2018-05-25 09:36:20 PDT
Created attachment 341294 [details]
Patch
Comment 2 youenn fablet 2018-05-25 09:53:34 PDT
Comment on attachment 341294 [details]
Patch

r = me as long as bots are happy.
Some potential improvements below.

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

> Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:1474
> +HashSet<RefPtr<SecurityOrigin>> ApplicationCacheStorage::originsWithCache()

Maybe HashSet<Ref<>>?

> Source/WebCore/loader/appcache/ApplicationCacheStorage.h:106
> +    WEBCORE_EXPORT ApplicationCacheStorage(const String& cacheDirectory, const String& flatFileSubdirectoryName);

Could probably be String&&

> Source/WebCore/loader/appcache/ApplicationCacheStorage.h:110
> +    bool getManifestURLs(Vector<URL>& urls);

Could be std::optional<Vector<>> manifestURLs()

> Source/WebCore/loader/appcache/ApplicationCacheStorage.h:145
> +    int64_t m_maximumSize { noQuota() };

Could it be uint64_t?

> Source/WebCore/loader/appcache/ApplicationCacheStorage.h:148
> +    int64_t m_defaultOriginQuota { noQuota() };

Ditto.
Comment 3 Chris Dumez 2018-05-25 10:36:42 PDT
Created attachment 341298 [details]
Patch
Comment 4 WebKit Commit Bot 2018-05-25 11:40:33 PDT
Comment on attachment 341298 [details]
Patch

Clearing flags on attachment: 341298

Committed r232192: <https://trac.webkit.org/changeset/232192>
Comment 5 WebKit Commit Bot 2018-05-25 11:40:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-05-25 11:41:22 PDT
<rdar://problem/40560786>