Title: [148231] trunk/Source
Revision
148231
Author
[email protected]
Date
2013-04-11 13:34:00 -0700 (Thu, 11 Apr 2013)

Log Message

Implement StorageManager::getValues
https://bugs.webkit.org/show_bug.cgi?id=114461

Reviewed by Beth Dakin.

Source/WebCore:

Expose the item hash map.

* storage/StorageMap.h:
(WebCore::StorageMap::items):

Source/WebKit2:

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::items):
(WebKit::StorageManager::getValues):
Return the items from the right storage area.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (148230 => 148231)


--- trunk/Source/WebCore/ChangeLog	2013-04-11 20:22:34 UTC (rev 148230)
+++ trunk/Source/WebCore/ChangeLog	2013-04-11 20:34:00 UTC (rev 148231)
@@ -1,3 +1,15 @@
+2013-04-11  Anders Carlsson  <[email protected]>
+
+        Implement StorageManager::getValues
+        https://bugs.webkit.org/show_bug.cgi?id=114461
+
+        Reviewed by Beth Dakin.
+
+        Expose the item hash map.
+
+        * storage/StorageMap.h:
+        (WebCore::StorageMap::items):
+
 2013-04-11  Eli Fidler  <[email protected]>
 
         [BlackBerry] Use the platform list of languages with fonts instead of hardcoding

Modified: trunk/Source/WebCore/storage/StorageMap.h (148230 => 148231)


--- trunk/Source/WebCore/storage/StorageMap.h	2013-04-11 20:22:34 UTC (rev 148230)
+++ trunk/Source/WebCore/storage/StorageMap.h	2013-04-11 20:34:00 UTC (rev 148231)
@@ -49,6 +49,7 @@
     bool contains(const String& key) const;
 
     void importItems(const HashMap<String, String>&);
+    const HashMap<String, String>& items() const { return m_map; }
 
     unsigned quota() const { return m_quotaSize; }
 

Modified: trunk/Source/WebKit2/ChangeLog (148230 => 148231)


--- trunk/Source/WebKit2/ChangeLog	2013-04-11 20:22:34 UTC (rev 148230)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-11 20:34:00 UTC (rev 148231)
@@ -1,5 +1,17 @@
 2013-04-11  Anders Carlsson  <[email protected]>
 
+        Implement StorageManager::getValues
+        https://bugs.webkit.org/show_bug.cgi?id=114461
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/Storage/StorageManager.cpp:
+        (WebKit::StorageManager::StorageArea::items):
+        (WebKit::StorageManager::getValues):
+        Return the items from the right storage area.
+
+2013-04-11  Anders Carlsson  <[email protected]>
+
         Clean up related storage areas when a connection is destroyed
         https://bugs.webkit.org/show_bug.cgi?id=114459
 

Modified: trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (148230 => 148231)


--- trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp	2013-04-11 20:22:34 UTC (rev 148230)
+++ trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp	2013-04-11 20:34:00 UTC (rev 148231)
@@ -47,6 +47,7 @@
     void removeListener(CoreIPC::Connection*, uint64_t storageMapID);
 
     void setItem(CoreIPC::Connection*, uint64_t sourceStorageAreaID, const String& key, const String& value, const String& urlString, bool& quotaException);
+    const HashMap<String, String>& items() const { return m_storageMap->items(); }
 
 private:
     explicit StorageArea(unsigned quotaInBytes);
@@ -256,9 +257,14 @@
     m_storageAreasByConnection.remove(connectionAndStorageMapIDPair);
 }
 
-void StorageManager::getValues(CoreIPC::Connection*, uint64_t, HashMap<String, String>&)
+void StorageManager::getValues(CoreIPC::Connection* connection, uint64_t storageMapID, HashMap<String, String>& values)
 {
-    // FIXME: Implement this.
+    StorageArea* storageArea = findStorageArea(connection, storageMapID);
+
+    // FIXME: This should be a message check.
+    ASSERT(storageArea);
+
+    values = storageArea->items();
 }
 
 void StorageManager::setItem(CoreIPC::Connection* connection, uint64_t storageMapID, uint64_t sourceStorageAreaID, const String& key, const String& value, const String& urlString)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to