Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1744)

Unified Diff: Source/modules/indexeddb/IDBAny.cpp

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: small cleanup Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/indexeddb/IDBAny.cpp
diff --git a/Source/modules/indexeddb/IDBAny.cpp b/Source/modules/indexeddb/IDBAny.cpp
index e776ddabb5c78874be484cdbfba3633573a73770..2f9514b0dff5361d1466738aab0f4b4c453de927 100644
--- a/Source/modules/indexeddb/IDBAny.cpp
+++ b/Source/modules/indexeddb/IDBAny.cpp
@@ -129,6 +129,12 @@ SharedBuffer* IDBAny::buffer()
return m_buffer.get();
}
+const Vector<BlobInfo>* IDBAny::blobInfo() const
+{
+ ASSERT(m_type == BufferType || m_type == BufferKeyAndKeyPathType);
+ return m_blobInfo;
+}
+
const String& IDBAny::string()
{
ASSERT(m_type == StringType);
@@ -190,18 +196,20 @@ IDBAny::IDBAny(PassRefPtr<IDBObjectStore> value)
{
}
-IDBAny::IDBAny(PassRefPtr<SharedBuffer> value)
+IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, const Vector<BlobInfo>* blobInfo)
: m_type(BufferType)
, m_buffer(value)
+ , m_blobInfo(blobInfo)
, m_integer(0)
{
}
-IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, const IDBKeyPath& keyPath)
+IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, const Vector<BlobInfo>* blobInfo, PassRefPtr<IDBKey> key, const IDBKeyPath& keyPath)
: m_type(BufferKeyAndKeyPathType)
, m_idbKey(key)
, m_idbKeyPath(keyPath)
, m_buffer(value)
+ , m_blobInfo(blobInfo)
, m_integer(0)
{
}

Powered by Google App Engine
This is Rietveld 408576698