Ignore:
Timestamp:
Jun 12, 2015, 3:04:27 PM (10 years ago)
Author:
[email protected]
Message:

Clean up IndexedDB website data retrieval and removal
https://bugs.webkit.org/show_bug.cgi?id=145941

Reviewed by Andreas Kling.

  • Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData

safely between threads.

  • Use std::chrono instead of double for modification times.
  • Get rid of endTime since it's not used.
  • Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take

a vector of origins instead of a single one.

  • Get rid of deleteAllIndexedDatabaseEntries.
  • Change SecurityOriginData::securityOrigin to call isolatedCopy on the origin components, since it's common

to pass origins to other threads and we want that to be safe.

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcess::indexedDatabaseOrigins):
(WebKit::removeAllDatabasesForOriginPath):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince):
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins): Deleted.
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): Deleted.
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
(WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): Deleted.

  • DatabaseProcess/DatabaseProcess.h:
  • Shared/SecurityOriginData.cpp:

(WebKit::SecurityOriginData::securityOrigin):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h

    r185479 r185521  
    5858    WorkQueue& queue() { return m_queue.get(); }
    5959
    60     Vector<SecurityOriginData> getIndexedDatabaseOrigins();
    61     void deleteIndexedDatabaseEntriesForOrigin(const SecurityOriginData&);
    62     void deleteIndexedDatabaseEntriesModifiedBetweenDates(double startDate, double endDate);
    63     void deleteAllIndexedDatabaseEntries();
    64 
    6560    void postDatabaseTask(std::unique_ptr<AsyncTask>);
    6661
     
    9186    void deleteWebsiteDataForOrigins(WebCore::SessionID, uint64_t websiteDataTypes, const Vector<SecurityOriginData>& origins, uint64_t callbackID);
    9287
     88    Vector<RefPtr<WebCore::SecurityOrigin>> indexedDatabaseOrigins();
     89    void deleteIndexedDatabaseEntriesForOrigins(const Vector<RefPtr<WebCore::SecurityOrigin>>&);
     90    void deleteIndexedDatabaseEntriesModifiedSince(std::chrono::system_clock::time_point modifiedSince);
     91
    9392    // For execution on work queue thread only
    9493    void performNextDatabaseTask();
Note: See TracChangeset for help on using the changeset viewer.