Changeset 171749 in webkit
- Timestamp:
- Jul 29, 2014 10:37:58 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r171747 r171749 1 2014-07-29 Brady Eidson <beidson@apple.com> 2 3 Make WKOriginDataManager actually operate on IndexedDatabases. 4 https://bugs.webkit.org/show_bug.cgi?id=135346 5 6 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen) 7 8 * WebCore.exp.in: 9 1 10 2014-07-29 Dan Bernstein <mitz@apple.com> 2 11 -
trunk/Source/WebCore/WebCore.exp.in
r171747 r171749 1067 1067 __ZN7WebCore37WidgetHierarchyUpdatesSuspensionScope35s_widgetHierarchyUpdateSuspendCountE 1068 1068 __ZN7WebCore3URL10invalidateEv 1069 __ZN7WebCore3URL11setProtocolERKN3WTF6StringE 1070 __ZN7WebCore3URL7setPathERKN3WTF6StringE 1069 1071 __ZN7WebCore3URLC1ENS_18ParsedURLStringTagERKN3WTF6StringE 1070 1072 __ZN7WebCore3URLC1EP5NSURL -
trunk/Source/WebKit2/ChangeLog
r171748 r171749 1 2014-07-29 Brady Eidson <beidson@apple.com> 2 3 Make WKOriginDataManager actually operate on IndexedDatabases. 4 https://bugs.webkit.org/show_bug.cgi?id=135346 5 6 Reviewed by Sam Weinig (and David Kilzer and Alex Christensen) 7 8 * DatabaseProcess/DatabaseProcess.cpp: 9 (WebKit::DatabaseProcess::DatabaseProcess): 10 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): 11 (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins): 12 (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path 13 that have been modified between the given dates. 14 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): 15 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin): 16 (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): 17 (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates): 18 (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): 19 (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries): 20 * DatabaseProcess/DatabaseProcess.h: 21 22 * Shared/WebCrossThreadCopier.cpp: 23 (WebCore::SecurityOriginData>::copy): 24 * Shared/WebCrossThreadCopier.h: 25 26 * UIProcess/WebOriginDataManagerProxy.cpp: 27 (WebKit::WebOriginDataManagerProxy::getOrigins): 28 (WebKit::WebOriginDataManagerProxy::didGetOrigins): 29 (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): 30 (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): 31 (WebKit::WebOriginDataManagerProxy::deleteAllEntries): 32 33 * WebProcess/OriginData/WebOriginDataManager.cpp: 34 (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess. 35 (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto. 36 (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto. 37 (WebKit::WebOriginDataManager::deleteAllEntries): Ditto. 38 1 39 2014-07-29 Commit Queue <commit-queue@webkit.org> 2 40 -
trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
r171622 r171749 35 35 #include "DatabaseToWebProcessConnection.h" 36 36 #include "UniqueIDBDatabase.h" 37 #include "WebCrossThreadCopier.h" 37 38 #include "WebOriginDataManager.h" 38 39 #include "WebOriginDataManagerMessages.h" 40 #include "WebOriginDataManagerProxyMessages.h" 39 41 #include <WebCore/FileSystem.h> 42 #include <WebCore/TextEncoding.h> 40 43 #include <wtf/MainThread.h> 41 44 … … 54 57 , m_webOriginDataManager(std::make_unique<WebOriginDataManager>(this)) 55 58 { 59 // Make sure the UTF8Encoding encoding and the text encoding maps have been built on the main thread before a background thread needs it. 60 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=135365 - Need a more explicit way of doing this besides accessing the UTF8Encoding. 61 UTF8Encoding(); 56 62 } 57 63 … … 186 192 } 187 193 194 void DatabaseProcess::getIndexedDatabaseOrigins(uint64_t callbackID) 195 { 196 postDatabaseTask(createAsyncTask(*this, &DatabaseProcess::doGetIndexedDatabaseOrigins, callbackID)); 197 } 198 199 void DatabaseProcess::doGetIndexedDatabaseOrigins(uint64_t callbackID) 200 { 201 Vector<SecurityOriginData> results; 202 203 if (m_indexedDatabaseDirectory.isEmpty()) { 204 send(Messages::WebOriginDataManagerProxy::DidGetOrigins(results, callbackID), 0); 205 return; 206 } 207 208 Vector<String> originPaths = listDirectory(m_indexedDatabaseDirectory, "*"); 209 for (auto& originPath : originPaths) { 210 URL url; 211 url.setProtocol(ASCIILiteral("file")); 212 url.setPath(originPath); 213 214 String databaseIdentifier = url.lastPathComponent(); 215 216 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::maybeCreateFromDatabaseIdentifier(databaseIdentifier); 217 if (!securityOrigin) 218 continue; 219 220 results.append(SecurityOriginData::fromSecurityOrigin(securityOrigin.get())); 221 } 222 223 send(Messages::WebOriginDataManagerProxy::DidGetOrigins(results, callbackID), 0); 224 } 225 226 static void removeAllDatabasesForOriginPath(const String& originPath, double startDate, double endDate) 227 { 228 // FIXME: We should also close/invalidate any live handles to the database files we are about to delete. 229 // Right now: 230 // - For read-only operations, they will continue functioning as normal on the unlinked file. 231 // - For write operations, they will start producing errors as SQLite notices the missing backing store. 232 // This is tracked by https://bugs.webkit.org/show_bug.cgi?id=135347 233 234 Vector<String> databasePaths = listDirectory(originPath, "*"); 235 236 for (auto& databasePath : databasePaths) { 237 String databaseFile = pathByAppendingComponent(databasePath, "IndexedDB.sqlite3"); 238 239 if (!fileExists(databaseFile)) 240 continue; 241 242 time_t modTime; 243 getFileModificationTime(databaseFile, modTime); 244 245 if (modTime < startDate || modTime > endDate) 246 continue; 247 248 deleteFile(databaseFile); 249 deleteEmptyDirectory(databasePath); 250 } 251 252 deleteEmptyDirectory(originPath); 253 } 254 255 void DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin(const SecurityOriginData& origin, uint64_t callbackID) 256 { 257 postDatabaseTask(createAsyncTask(*this, &DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin, origin, callbackID)); 258 } 259 260 void DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin(const SecurityOriginData& originData, uint64_t callbackID) 261 { 262 if (m_indexedDatabaseDirectory.isEmpty()) { 263 send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 264 return; 265 } 266 267 RefPtr<SecurityOrigin> origin = originData.securityOrigin(); 268 String databaseIdentifier = origin->databaseIdentifier(); 269 String originPath = pathByAppendingComponent(m_indexedDatabaseDirectory, databaseIdentifier); 270 271 removeAllDatabasesForOriginPath(originPath, std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max()); 272 273 send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 274 } 275 276 void DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates(double startDate, double endDate, uint64_t callbackID) 277 { 278 postDatabaseTask(createAsyncTask(*this, &DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates, startDate, endDate, callbackID)); 279 } 280 281 void DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates(double startDate, double endDate, uint64_t callbackID) 282 { 283 if (m_indexedDatabaseDirectory.isEmpty()) { 284 send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 285 return; 286 } 287 288 Vector<String> originPaths = listDirectory(m_indexedDatabaseDirectory, "*"); 289 for (auto& originPath : originPaths) 290 removeAllDatabasesForOriginPath(originPath, startDate, endDate); 291 292 send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 293 } 294 295 void DatabaseProcess::deleteAllIndexedDatabaseEntries(uint64_t callbackID) 296 { 297 postDatabaseTask(createAsyncTask(*this, &DatabaseProcess::doDeleteAllIndexedDatabaseEntries, callbackID)); 298 } 299 300 void DatabaseProcess::doDeleteAllIndexedDatabaseEntries(uint64_t callbackID) 301 { 302 if (m_indexedDatabaseDirectory.isEmpty()) { 303 send(Messages::WebOriginDataManagerProxy::DidDeleteAllEntries(callbackID), 0); 304 return; 305 } 306 307 Vector<String> originPaths = listDirectory(m_indexedDatabaseDirectory, "*"); 308 for (auto& originPath : originPaths) 309 removeAllDatabasesForOriginPath(originPath, std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max()); 310 311 send(Messages::WebOriginDataManagerProxy::DidDeleteAllEntries(callbackID), 0); 312 } 313 188 314 #if !PLATFORM(COCOA) 189 315 void DatabaseProcess::initializeProcess(const ChildProcessInitializationParameters&) -
trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.h
r171622 r171749 61 61 WorkQueue& queue() { return m_queue.get(); } 62 62 63 void getIndexedDatabaseOrigins(uint64_t callbackID); 64 void deleteIndexedDatabaseEntriesForOrigin(const SecurityOriginData&, uint64_t callbackID); 65 void deleteIndexedDatabaseEntriesModifiedBetweenDates(double startDate, double endDate, uint64_t callbackID); 66 void deleteAllIndexedDatabaseEntries(uint64_t callbackID); 67 63 68 private: 64 69 DatabaseProcess(); … … 86 91 void performNextDatabaseTask(); 87 92 void ensurePathExists(const String&); 93 void doGetIndexedDatabaseOrigins(uint64_t callbackID); 94 void doDeleteIndexedDatabaseEntriesForOrigin(const SecurityOriginData&, uint64_t callbackID); 95 void doDeleteIndexedDatabaseEntriesModifiedBetweenDates(double startDate, double endDate, uint64_t callbackID); 96 void doDeleteAllIndexedDatabaseEntries(uint64_t callbackID); 88 97 89 98 Vector<RefPtr<DatabaseToWebProcessConnection>> m_databaseToWebProcessConnections; -
trunk/Source/WebKit2/Shared/WebCrossThreadCopier.cpp
r163959 r171749 29 29 30 30 #include "IDBIdentifier.h" 31 #include "SecurityOriginData.h" 31 32 #include "UniqueIDBDatabaseIdentifier.h" 32 33 #include <WebCore/IDBKeyData.h> … … 80 81 } 81 82 83 SecurityOriginData CrossThreadCopierBase<false, false, SecurityOriginData>::copy(const SecurityOriginData& securityOriginData) 84 { 85 return securityOriginData.isolatedCopy(); 86 } 87 82 88 ASCIILiteral CrossThreadCopierBase<false, false, ASCIILiteral>::copy(const ASCIILiteral& literal) 83 89 { -
trunk/Source/WebKit2/Shared/WebCrossThreadCopier.h
r163266 r171749 37 37 38 38 enum class UniqueIDBDatabaseShutdownType; 39 40 struct SecurityOriginData; 39 41 } 40 42 … … 59 61 return type; 60 62 } 63 }; 64 65 template<> struct CrossThreadCopierBase<false, false, WebKit::SecurityOriginData> { 66 static WebKit::SecurityOriginData copy(const WebKit::SecurityOriginData& type); 61 67 }; 62 68 -
trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp
r171622 r171749 32 32 #include "WebOriginDataManagerProxyMessages.h" 33 33 #include "WebSecurityOrigin.h" 34 #include <WebCore/SecurityOrigin.h> 35 #include <wtf/NeverDestroyed.h> 36 37 using namespace WebCore; 34 38 35 39 namespace WebKit { … … 83 87 void WebOriginDataManagerProxy::getOrigins(WKOriginDataTypes types, std::function<void (API::Array*, CallbackBase::Error)> callbackFunction) 84 88 { 89 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 90 // That's why having one single callback works. 91 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 92 if (!(types & kWKIndexedDatabaseData)) { 93 callbackFunction(nullptr, CallbackBase::Error::None); 94 return; 95 } 96 85 97 RefPtr<ArrayCallback> callback = ArrayCallback::create(WTF::move(callbackFunction)); 86 98 … … 93 105 m_arrayCallbacks.set(callbackID, callback.release()); 94 106 95 // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess. 96 context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebOriginDataManager::GetOrigins(types, callbackID)); 97 } 98 99 void WebOriginDataManagerProxy::didGetOrigins(const Vector<SecurityOriginData>& originDatas, uint64_t callbackID) 107 context()->sendToDatabaseProcessRelaunchingIfNecessary(Messages::WebOriginDataManager::GetOrigins(types, callbackID)); 108 } 109 110 void WebOriginDataManagerProxy::didGetOrigins(IPC::Connection* connection, const Vector<SecurityOriginData>& originIdentifiers, uint64_t callbackID) 100 111 { 101 112 RefPtr<ArrayCallback> callback = m_arrayCallbacks.take(callbackID); 102 performAPICallbackWithSecurityOriginDataVector(originDatas, callback.get()); 113 MESSAGE_CHECK_BASE(callback, connection); 114 115 Vector<RefPtr<API::Object>> securityOrigins; 116 securityOrigins.reserveInitialCapacity(originIdentifiers.size()); 117 118 for (const auto& originIdentifier : originIdentifiers) 119 securityOrigins.uncheckedAppend(WebSecurityOrigin::create(originIdentifier.securityOrigin())); 120 121 callback->performCallbackWithReturnValue(API::Array::create(WTF::move(securityOrigins)).get()); 103 122 } 104 123 105 124 void WebOriginDataManagerProxy::deleteEntriesForOrigin(WKOriginDataTypes types, WebSecurityOrigin* origin, std::function<void (CallbackBase::Error)> callbackFunction) 106 125 { 107 if (!(types & kWKIndexedDatabaseData)) 108 return; 109 110 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 111 // That's why having one single callback works. 112 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 126 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 127 // That's why having one single callback works. 128 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 129 if (!(types & kWKIndexedDatabaseData)) { 130 callbackFunction(CallbackBase::Error::None); 131 return; 132 } 113 133 114 134 RefPtr<VoidCallback> callback = VoidCallback::create(WTF::move(callbackFunction)); … … 132 152 void WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates(WKOriginDataTypes types, double startDate, double endDate, std::function<void (CallbackBase::Error)> callbackFunction) 133 153 { 134 if (!(types & kWKIndexedDatabaseData)) 135 return; 136 137 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 138 // That's why having one single callback works. 139 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 154 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 155 // That's why having one single callback works. 156 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 157 if (!(types & kWKIndexedDatabaseData)) { 158 callbackFunction(CallbackBase::Error::None); 159 return; 160 } 140 161 141 162 RefPtr<VoidCallback> callback = VoidCallback::create(WTF::move(callbackFunction)); … … 152 173 } 153 174 154 void WebOriginDataManagerProxy::didDeleteEntries( uint64_t callbackID)175 void WebOriginDataManagerProxy::didDeleteEntries(IPC::Connection* connection, uint64_t callbackID) 155 176 { 156 177 RefPtr<VoidCallback> callback = m_voidCallbacks.take(callbackID); 178 MESSAGE_CHECK_BASE(callback, connection); 157 179 callback->performCallback(); 158 180 } … … 160 182 void WebOriginDataManagerProxy::deleteAllEntries(WKOriginDataTypes types, std::function<void (CallbackBase::Error)> callbackFunction) 161 183 { 162 if (!(types & kWKIndexedDatabaseData)) 163 return; 164 165 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 166 // That's why having one single callback works. 167 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 184 // FIXME: Right now we only support IndexedDatabase data so we know that we're only sending this request to the DatabaseProcess. 185 // That's why having one single callback works. 186 // In the future when we message N-processes we'll have to wait for all N replies before responding to the client. 187 if (!(types & kWKIndexedDatabaseData)) { 188 callbackFunction(CallbackBase::Error::None); 189 return; 190 } 168 191 169 192 RefPtr<VoidCallback> callback = VoidCallback::create(WTF::move(callbackFunction)); … … 180 203 } 181 204 182 void WebOriginDataManagerProxy::didDeleteAllEntries( uint64_t callbackID)205 void WebOriginDataManagerProxy::didDeleteAllEntries(IPC::Connection* connection, uint64_t callbackID) 183 206 { 184 207 RefPtr<VoidCallback> callback = m_voidCallbacks.take(callbackID); 208 MESSAGE_CHECK_BASE(callback, connection); 185 209 callback->performCallback(); 186 210 } -
trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.h
r171622 r171749 68 68 explicit WebOriginDataManagerProxy(WebContext*); 69 69 70 void didGetOrigins( const Vector<SecurityOriginData>&, uint64_t callbackID);71 void didDeleteEntries( uint64_t callbackID);72 void didDeleteAllEntries( uint64_t callbackID);70 void didGetOrigins(IPC::Connection*, const Vector<SecurityOriginData>&, uint64_t callbackID); 71 void didDeleteEntries(IPC::Connection*, uint64_t callbackID); 72 void didDeleteAllEntries(IPC::Connection*, uint64_t callbackID); 73 73 74 74 // WebContextSupplement -
trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.messages.in
r171622 r171749 22 22 23 23 messages -> WebOriginDataManagerProxy { 24 DidGetOrigins(Vector<WebKit::SecurityOriginData> originIdentifiers, uint64_t callbackID) ;25 DidDeleteEntries(uint64_t callbackID) ;26 DidDeleteAllEntries(uint64_t callbackID) ;24 DidGetOrigins(Vector<WebKit::SecurityOriginData> originIdentifiers, uint64_t callbackID) WantsConnection 25 DidDeleteEntries(uint64_t callbackID) WantsConnection 26 DidDeleteAllEntries(uint64_t callbackID) WantsConnection 27 27 } -
trunk/Source/WebKit2/WebProcess/OriginData/WebOriginDataManager.cpp
r171622 r171749 27 27 #include "WebOriginDataManager.h" 28 28 29 #include " ChildProcess.h"29 #include "DatabaseProcess.h" 30 30 #include "SecurityOriginData.h" 31 31 #include "WebCoreArgumentCoders.h" … … 52 52 } 53 53 54 void WebOriginDataManager::getOrigins(WKOriginDataTypes , uint64_t callbackID)54 void WebOriginDataManager::getOrigins(WKOriginDataTypes types, uint64_t callbackID) 55 55 { 56 HashSet<RefPtr<SecurityOrigin>> origins; 57 58 // FIXME: populate origins 59 60 Vector<SecurityOriginData> identifiers; 61 identifiers.reserveCapacity(origins.size()); 62 63 HashSet<RefPtr<SecurityOrigin>>::iterator end = origins.end(); 64 HashSet<RefPtr<SecurityOrigin>>::iterator i = origins.begin(); 65 for (; i != end; ++i) { 66 RefPtr<SecurityOrigin> origin = *i; 67 68 SecurityOriginData originData; 69 originData.protocol = origin->protocol(); 70 originData.host = origin->host(); 71 originData.port = origin->port(); 72 73 identifiers.uncheckedAppend(originData); 56 // FIXME: For now, the DatabaseProcess only handles IndexedDatabase origin data. 57 // If it ever starts handling other data types (e.g. WebSQL) then it will have to aggregrate requests 58 // for multiple types into the one callback. 59 if (types & kWKIndexedDatabaseData) { 60 DatabaseProcess::shared().getIndexedDatabaseOrigins(callbackID); 61 return; 74 62 } 75 63 76 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidGetOrigins(identifiers, callbackID), 0); 64 Vector<SecurityOriginData> results; 65 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidGetOrigins(results, callbackID), 0); 77 66 } 78 67 79 void WebOriginDataManager::deleteEntriesForOrigin(WKOriginDataTypes , const SecurityOriginData& origindata, uint64_t callbackID)68 void WebOriginDataManager::deleteEntriesForOrigin(WKOriginDataTypes types, const SecurityOriginData& originData, uint64_t callbackID) 80 69 { 81 // FIXME: delete entries for origin82 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0);83 } 84 85 void WebOriginDataManager::deleteEntriesModifiedBetweenDates(WKOriginDataTypes, double, double, uint64_t callbackID) 86 { 87 // FIXME: delete entries modified between the start and end date70 // FIXME: For now, the DatabaseProcess only handles IndexedDatabase origin data. 71 // If it ever starts handling other data types (e.g. WebSQL) then it will have to aggregrate requests 72 // for multiple types into the one callback. 73 if (types & kWKIndexedDatabaseData) { 74 DatabaseProcess::shared().deleteIndexedDatabaseEntriesForOrigin(originData, callbackID); 75 return; 76 } 88 77 89 78 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 90 79 } 91 80 92 void WebOriginDataManager::delete AllEntries(WKOriginDataTypes, uint64_t callbackID)81 void WebOriginDataManager::deleteEntriesModifiedBetweenDates(WKOriginDataTypes types, double startTime, double endTime, uint64_t callbackID) 93 82 { 94 // FIXME: delete entries 83 // FIXME: For now, the DatabaseProcess only handles IndexedDatabase origin data. 84 // If it ever starts handling other data types (e.g. WebSQL) then it will have to aggregrate requests 85 // for multiple types into the one callback. 86 if (types & kWKIndexedDatabaseData) { 87 DatabaseProcess::shared().deleteIndexedDatabaseEntriesModifiedBetweenDates(startTime, endTime, callbackID); 88 return; 89 } 90 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidDeleteEntries(callbackID), 0); 91 } 95 92 93 void WebOriginDataManager::deleteAllEntries(WKOriginDataTypes types, uint64_t callbackID) 94 { 95 // FIXME: For now, the DatabaseProcess only handles IndexedDatabase origin data. 96 // If it ever starts handling other data types (e.g. WebSQL) then it will have to aggregrate requests 97 // for multiple types into the one callback. 98 if (types & kWKIndexedDatabaseData) { 99 DatabaseProcess::shared().deleteAllIndexedDatabaseEntries(callbackID); 100 return; 101 } 96 102 m_childProcess->send(Messages::WebOriginDataManagerProxy::DidDeleteAllEntries(callbackID), 0); 97 103 }
Note: See TracChangeset
for help on using the changeset viewer.