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

Side by Side Diff: Source/modules/indexeddb/IDBAny.cpp

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 ASSERT(m_type == KeyPathType || m_type == BufferKeyAndKeyPathType); 115 ASSERT(m_type == KeyPathType || m_type == BufferKeyAndKeyPathType);
116 return m_idbKeyPath; 116 return m_idbKeyPath;
117 } 117 }
118 118
119 SharedBuffer* IDBAny::buffer() const 119 SharedBuffer* IDBAny::buffer() const
120 { 120 {
121 ASSERT(m_type == BufferType || m_type == BufferKeyAndKeyPathType); 121 ASSERT(m_type == BufferType || m_type == BufferKeyAndKeyPathType);
122 return m_buffer.get(); 122 return m_buffer.get();
123 } 123 }
124 124
125 const Vector<blink::WebBlobInfo>* IDBAny::blobInfo() const
126 {
127 ASSERT(m_type == BufferType || m_type == BufferKeyAndKeyPathType);
128 return m_blobInfo;
129 }
130
125 const String& IDBAny::string() const 131 const String& IDBAny::string() const
126 { 132 {
127 ASSERT(m_type == StringType); 133 ASSERT(m_type == StringType);
128 return m_string; 134 return m_string;
129 } 135 }
130 136
131 int64_t IDBAny::integer() const 137 int64_t IDBAny::integer() const
132 { 138 {
133 ASSERT(m_type == IntegerType); 139 ASSERT(m_type == IntegerType);
134 return m_integer; 140 return m_integer;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 { 175 {
170 } 176 }
171 177
172 IDBAny::IDBAny(PassRefPtr<IDBObjectStore> value) 178 IDBAny::IDBAny(PassRefPtr<IDBObjectStore> value)
173 : m_type(IDBObjectStoreType) 179 : m_type(IDBObjectStoreType)
174 , m_idbObjectStore(value) 180 , m_idbObjectStore(value)
175 , m_integer(0) 181 , m_integer(0)
176 { 182 {
177 } 183 }
178 184
179 IDBAny::IDBAny(PassRefPtr<SharedBuffer> value) 185 IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo)
180 : m_type(BufferType) 186 : m_type(BufferType)
181 , m_buffer(value) 187 , m_buffer(value)
188 , m_blobInfo(blobInfo)
182 , m_integer(0) 189 , m_integer(0)
183 { 190 {
184 } 191 }
185 192
186 IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, const IDB KeyPath& keyPath) 193 IDBAny::IDBAny(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo, PassRefPtr<IDBKey> key, const IDBKeyPath& keyPath)
187 : m_type(BufferKeyAndKeyPathType) 194 : m_type(BufferKeyAndKeyPathType)
188 , m_idbKey(key) 195 , m_idbKey(key)
189 , m_idbKeyPath(keyPath) 196 , m_idbKeyPath(keyPath)
190 , m_buffer(value) 197 , m_buffer(value)
198 , m_blobInfo(blobInfo)
191 , m_integer(0) 199 , m_integer(0)
192 { 200 {
193 } 201 }
194 202
195 IDBAny::IDBAny(PassRefPtr<IDBKey> key) 203 IDBAny::IDBAny(PassRefPtr<IDBKey> key)
196 : m_type(KeyType) 204 : m_type(KeyType)
197 , m_idbKey(key) 205 , m_idbKey(key)
198 , m_integer(0) 206 , m_integer(0)
199 { 207 {
200 } 208 }
(...skipping 12 matching lines...) Expand all
213 { 221 {
214 } 222 }
215 223
216 IDBAny::IDBAny(int64_t value) 224 IDBAny::IDBAny(int64_t value)
217 : m_type(IntegerType) 225 : m_type(IntegerType)
218 , m_integer(value) 226 , m_integer(value)
219 { 227 {
220 } 228 }
221 229
222 } // namespace WebCore 230 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698