Bug 185984

Summary: Minor ApplicationCacheStorage clean up
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, dbates, ews-watchlist, ggaren, japhet, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>