[webkit-changes] [WebKit/WebKit] 7b7571: Refactor WebKit::PCM::Store in preparation for int...

Wenson Hsieh noreply at github.com
Thu Mar 9 11:20:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b7571cb400a3b0f77dc0142a071b220c37fe6d2
      https://github.com/WebKit/WebKit/commit/7b7571cb400a3b0f77dc0142a071b220c37fe6d2
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/NetworkProcess.cpp
    M Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp
    A Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementPersistentStore.cpp
    A Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementPersistentStore.h
    R Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp
    M Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h
    M Source/WebKit/Sources.txt
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Refactor WebKit::PCM::Store in preparation for introducing an ephemeral PCM store
https://bugs.webkit.org/show_bug.cgi?id=253623

Reviewed by Tim Horton.

Refactor the implementation of `PCM::Store`, such that:
- `PCM::Store` is now an abstract interface.
- Logic that was previously in `PCM::Store` is now moved to `PCM::PersistentStore`.
This prepares us for a subsequent patch, which will introduce and adopt a non-peristent subclass of
`PCM::Store`.

No change in behavior.

* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::processDidResume):
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:
(WebKit::PrivateClickMeasurementManager::store):
(WebKit::PrivateClickMeasurementManager::store const):

Switch from using `PCM::Store::create` to `PCM::PersistentStore::create`.

* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementPersistentStore.cpp: Renamed from Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.cpp.
(WebKit::PCM::sharedWorkQueue):
(WebKit::PCM::PersistentStore::prepareForProcessToSuspend):
(WebKit::PCM::PersistentStore::processDidResume):
(WebKit::PCM::PersistentStore::PersistentStore):
(WebKit::PCM::PersistentStore::postTask const):
(WebKit::PCM::PersistentStore::postTaskReply const):
(WebKit::PCM::PersistentStore::insertPrivateClickMeasurement):
(WebKit::PCM::PersistentStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting):
(WebKit::PCM::PersistentStore::attributePrivateClickMeasurement):
(WebKit::PCM::PersistentStore::privateClickMeasurementToStringForTesting const):
(WebKit::PCM::PersistentStore::allAttributedPrivateClickMeasurement):
(WebKit::PCM::PersistentStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::PCM::PersistentStore::clearPrivateClickMeasurement):
(WebKit::PCM::PersistentStore::clearPrivateClickMeasurementForRegistrableDomain):
(WebKit::PCM::PersistentStore::clearExpiredPrivateClickMeasurement):
(WebKit::PCM::PersistentStore::clearSentAttribution):

Moved from `PCM::Store`.

(WebKit::PCM::PersistentStore::close):
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementPersistentStore.h: Copied from Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h.
(WebKit::PCM::PersistentStore::create):
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementStore.h:
(WebKit::PCM::Store::create): Deleted.
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/261450@main




More information about the webkit-changes mailing list