Use enum classes within FileSystem
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 20:20:28 +0000 (20:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 20:20:28 +0000 (20:20 +0000)
commit047a188699a32c2e138565a083d6e36eff00ece4
tree1f3787406d68365b59176d34b0e40593ae5f252c
parenta55564179a7e2e8b05641bf7c88122ca33a7d60d
Use enum classes within FileSystem
https://bugs.webkit.org/show_bug.cgi?id=175172

Patch by Christopher Reid <chris.reid@sony.com> on 2017-11-06
Reviewed by Myles C. Maxfield.

Source/WebCore:

No new tests, no change in behavior.

Using enum classes in filesystem to enforce stronger type safety.

* Modules/webdatabase/OriginLock.cpp:
* loader/appcache/ApplicationCacheStorage.cpp:
* platform/FileHandle.h:
* platform/FileStream.cpp:
* platform/FileSystem.cpp:
* platform/FileSystem.h:
* platform/cocoa/FileMonitorCocoa.mm:
* platform/glib/FileSystemGlib.cpp:
* platform/network/curl/CurlCacheEntry.cpp:
* platform/network/curl/CurlCacheManager.cpp:
* platform/posix/FileSystemPOSIX.cpp:
* platform/win/FileSystemWin.cpp:
* rendering/RenderThemeWin.cpp:

Source/WebKit:

* NetworkProcess/Downloads/BlobDownloadClient.cpp:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/capture/NetworkCaptureManager.cpp:
* NetworkProcess/capture/NetworkCaptureRecorder.cpp:
* Shared/WebMemorySampler.cpp:
* UIProcess/API/APIContentRuleListStore.cpp:
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

Source/WebKitLegacy/win:

* Plugins/PluginDatabase.cpp:

Source/WTF:

Adding a helper function for converting enum classes to their underlying type when necessary.

* wtf/EnumTraits.h:

Tools:

* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
* TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/EnumTraits.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/OriginLock.cpp
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
Source/WebCore/platform/FileHandle.h
Source/WebCore/platform/FileStream.cpp
Source/WebCore/platform/FileSystem.cpp
Source/WebCore/platform/FileSystem.h
Source/WebCore/platform/cocoa/FileMonitorCocoa.mm
Source/WebCore/platform/glib/FileSystemGlib.cpp
Source/WebCore/platform/network/curl/CurlCacheEntry.cpp
Source/WebCore/platform/network/curl/CurlCacheManager.cpp
Source/WebCore/platform/posix/FileSystemPOSIX.cpp
Source/WebCore/platform/win/FileSystemWin.cpp
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Downloads/BlobDownloadClient.cpp
Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp
Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit/NetworkProcess/capture/NetworkCaptureManager.cpp
Source/WebKit/NetworkProcess/capture/NetworkCaptureRecorder.cpp
Source/WebKit/Shared/WebMemorySampler.cpp
Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp
Tools/TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm