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

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

Issue 235933013: Add the backchannel for Blobs to be received into Blink from the database backend. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove accidentally-included files Created 6 years, 8 months 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.h
diff --git a/Source/modules/indexeddb/IDBAny.h b/Source/modules/indexeddb/IDBAny.h
index 2a94777b4c348f3a277832fc7a93e70796bcfecd..d9bbb2a7ebdc32c4f281092fb31d797e09fd5cb6 100644
--- a/Source/modules/indexeddb/IDBAny.h
+++ b/Source/modules/indexeddb/IDBAny.h
@@ -35,6 +35,12 @@
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
+namespace blink {
+
+class WebBlobInfo;
+
+}
+
namespace WebCore {
class DOMStringList;
@@ -61,6 +67,10 @@ public:
{
return adoptRef(new IDBAny(idbObject));
}
+ static PassRefPtr<IDBAny> create(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo)
+ {
+ return adoptRef(new IDBAny(value, blobInfo));
+ }
template<typename T>
static PassRefPtr<IDBAny> create(PassRefPtr<T> idbObject)
{
@@ -70,9 +80,9 @@ public:
{
return adoptRef(new IDBAny(value));
}
- static PassRefPtr<IDBAny> create(PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, const IDBKeyPath& keyPath)
+ static PassRefPtr<IDBAny> create(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo, PassRefPtr<IDBKey> key, const IDBKeyPath& keyPath)
{
- return adoptRef(new IDBAny(value, key, keyPath));
+ return adoptRef(new IDBAny(value, blobInfo, key, keyPath));
}
~IDBAny();
@@ -104,6 +114,7 @@ public:
IDBObjectStore* idbObjectStore() const;
IDBTransaction* idbTransaction() const;
SharedBuffer* buffer() const;
+ const Vector<blink::WebBlobInfo>* blobInfo() const;
int64_t integer() const;
const String& string() const;
const IDBKey* key() const;
@@ -120,13 +131,13 @@ private:
explicit IDBAny(PassRefPtr<IDBKey>);
explicit IDBAny(const IDBKeyPath&);
explicit IDBAny(const String&);
- explicit IDBAny(PassRefPtr<SharedBuffer>);
- explicit IDBAny(PassRefPtr<SharedBuffer>, PassRefPtr<IDBKey>, const IDBKeyPath&);
+ IDBAny(PassRefPtr<SharedBuffer>, const Vector<blink::WebBlobInfo>*);
+ IDBAny(PassRefPtr<SharedBuffer>, const Vector<blink::WebBlobInfo>*, PassRefPtr<IDBKey>, const IDBKeyPath&);
explicit IDBAny(int64_t);
const Type m_type;
- // Only one of the following should ever be in use at any given time.
+ // Only one of the following should ever be in use at any given time, except that BufferType uses two and BufferKeyAndKeyPathType uses four.
const RefPtr<DOMStringList> m_domStringList;
const RefPtr<IDBCursor> m_idbCursor;
const RefPtr<IDBDatabase> m_idbDatabase;
@@ -136,6 +147,7 @@ private:
const RefPtr<IDBKey> m_idbKey;
const IDBKeyPath m_idbKeyPath;
const RefPtr<SharedBuffer> m_buffer;
+ const Vector<blink::WebBlobInfo>* m_blobInfo;
const String m_string;
const int64_t m_integer;
};

Powered by Google App Engine
This is Rietveld 408576698