Changeset 148160 in webkit
- Timestamp:
- Apr 10, 2013 6:03:03 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r148159 r148160 1 2013-04-10 Anders Carlsson <andersca@apple.com> 2 3 Rename StorageManager messages to refer to the StorageMap instead of the StorageArea 4 https://bugs.webkit.org/show_bug.cgi?id=114401 5 6 Reviewed by Ryosuke Niwa. 7 8 * UIProcess/Storage/StorageManager.cpp: 9 (WebKit::StorageManager::createStorageMap): 10 (WebKit::StorageManager::destroyStorageMap): 11 (WebKit::StorageManager::setItem): 12 * UIProcess/Storage/StorageManager.h: 13 * UIProcess/Storage/StorageManager.messages.in: 14 * WebProcess/Storage/StorageAreaImpl.cpp: 15 (WebKit::StorageAreaImpl::StorageAreaImpl): 16 (WebKit::StorageAreaImpl::~StorageAreaImpl): 17 1 18 2013-04-10 Benjamin Poulain <bpoulain@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp
r148154 r148160 213 213 } 214 214 215 void StorageManager::createStorage Area(CoreIPC::Connection* connection, uint64_t storageAreaID, uint64_t storageNamespaceID, const SecurityOriginData& securityOriginData)216 { 217 std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorage AreaIDPair(connection, storageAreaID);218 219 // FIXME: This should be a message check. 220 ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::isValidKey(connectionAndStorage AreaIDPair)));221 222 HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::AddResult result = m_storageAreas.add(connectionAndStorage AreaIDPair, 0);215 void StorageManager::createStorageMap(CoreIPC::Connection* connection, uint64_t storageMapID, uint64_t storageNamespaceID, const SecurityOriginData& securityOriginData) 216 { 217 std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorageMapIDPair(connection, storageMapID); 218 219 // FIXME: This should be a message check. 220 ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::isValidKey(connectionAndStorageMapIDPair))); 221 222 HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::AddResult result = m_storageAreas.add(connectionAndStorageMapIDPair, 0); 223 223 224 224 // FIXME: This should be a message check. … … 238 238 239 239 RefPtr<StorageArea> storageArea = sessionStorageNamespace->getOrCreateStorageArea(securityOriginData.securityOrigin()); 240 storageArea->addListener(connection, storage AreaID);240 storageArea->addListener(connection, storageMapID); 241 241 242 242 result.iterator->value = storageArea.release(); 243 243 } 244 244 245 void StorageManager::destroyStorage Area(CoreIPC::Connection* connection, uint64_t storageAreaID)246 { 247 std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorage AreaIDPair(connection, storageAreaID);248 249 // FIXME: This should be a message check. 250 ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::isValidKey(connectionAndStorage AreaIDPair)));251 252 HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::iterator it = m_storageAreas.find(connectionAndStorage AreaIDPair);245 void StorageManager::destroyStorageMap(CoreIPC::Connection* connection, uint64_t storageMapID) 246 { 247 std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorageMapIDPair(connection, storageMapID); 248 249 // FIXME: This should be a message check. 250 ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::isValidKey(connectionAndStorageMapIDPair))); 251 252 HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea> >::iterator it = m_storageAreas.find(connectionAndStorageMapIDPair); 253 253 254 254 // FIXME: This should be a message check. 255 255 ASSERT(it != m_storageAreas.end()); 256 256 257 it->value->removeListener(connection, storage AreaID);258 259 m_storageAreas.remove(connectionAndStorage AreaIDPair);257 it->value->removeListener(connection, storageMapID); 258 259 m_storageAreas.remove(connectionAndStorageMapIDPair); 260 260 } 261 261 … … 265 265 } 266 266 267 void StorageManager::setItem(CoreIPC::Connection* connection, uint64_t storage AreaID, const String& key, const String& value, const String& urlString)268 { 269 StorageArea* storageArea = findStorageArea(connection, storage AreaID);267 void StorageManager::setItem(CoreIPC::Connection* connection, uint64_t storageMapID, const String& key, const String& value, const String& urlString) 268 { 269 StorageArea* storageArea = findStorageArea(connection, storageMapID); 270 270 271 271 // FIXME: This should be a message check. … … 273 273 274 274 bool quotaError; 275 storageArea->setItem(connection, storage AreaID, key, value, urlString, quotaError);276 connection->send(Messages::StorageAreaMap::DidSetItem(key, quotaError), storage AreaID);275 storageArea->setItem(connection, storageMapID, key, value, urlString, quotaError); 276 connection->send(Messages::StorageAreaMap::DidSetItem(key, quotaError), storageMapID); 277 277 } 278 278 -
trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h
r144695 r148160 60 60 61 61 // Message handlers. 62 void createStorage Area(CoreIPC::Connection*, uint64_t storageAreaID, uint64_t storageNamespaceID, const SecurityOriginData&);63 void destroyStorage Area(CoreIPC::Connection*, uint64_t storageAreaID);64 void getValues(CoreIPC::Connection*, uint64_t storage AreaID, HashMap<String, String>& values);62 void createStorageMap(CoreIPC::Connection*, uint64_t storageMapID, uint64_t storageNamespaceID, const SecurityOriginData&); 63 void destroyStorageMap(CoreIPC::Connection*, uint64_t storageMapID); 64 void getValues(CoreIPC::Connection*, uint64_t storageMapID, HashMap<String, String>& values); 65 65 void setItem(CoreIPC::Connection*, uint64_t storageAreaID, const String& key, const String& value, const String& urlString); 66 66 -
trunk/Source/WebKit2/UIProcess/Storage/StorageManager.messages.in
r144691 r148160 22 22 23 23 messages -> StorageManager { 24 CreateStorage Area(uint64_t storageAreaID, uint64_t storageNamespaceID, WebKit::SecurityOriginData securityOriginData) WantsConnection25 DestroyStorage Area(uint64_t storageAreaID) WantsConnection24 CreateStorageMap(uint64_t storageMapID, uint64_t storageNamespaceID, WebKit::SecurityOriginData securityOriginData) WantsConnection 25 DestroyStorageMap(uint64_t storageMapID) WantsConnection 26 26 27 GetValues(uint64_t storage AreaID) -> (WTF::HashMap<WTF::String, WTF::String> values) WantsConnection27 GetValues(uint64_t storageMapID) -> (WTF::HashMap<WTF::String, WTF::String> values) WantsConnection 28 28 29 SetItem(uint64_t storage AreaID, WTF::String key, WTF::String value, WTF::String urlString) WantsConnection29 SetItem(uint64_t storageMapID, WTF::String key, WTF::String value, WTF::String urlString) WantsConnection 30 30 } -
trunk/Source/WebKit2/WebProcess/Storage/StorageAreaImpl.cpp
r148154 r148160 60 60 , m_securityOrigin(securityOrigin) 61 61 { 62 WebProcess::shared().connection()->send(Messages::StorageManager::CreateStorage Area(m_storageAreaID, StorageNamespaceImpl->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);62 WebProcess::shared().connection()->send(Messages::StorageManager::CreateStorageMap(m_storageAreaID, StorageNamespaceImpl->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0); 63 63 WebProcess::shared().addMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageAreaID, this); 64 64 } … … 66 66 StorageAreaImpl::~StorageAreaImpl() 67 67 { 68 WebProcess::shared().connection()->send(Messages::StorageManager::DestroyStorage Area(m_storageAreaID), 0);68 WebProcess::shared().connection()->send(Messages::StorageManager::DestroyStorageMap(m_storageAreaID), 0); 69 69 WebProcess::shared().removeMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageAreaID); 70 70 }
Note: See TracChangeset
for help on using the changeset viewer.