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

Unified Diff: content/browser/indexed_db/indexed_db_value.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ScopedVector and stl_utils for BlobDataHandles. 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: content/browser/indexed_db/indexed_db_value.h
diff --git a/content/browser/indexed_db/indexed_db_value.h b/content/browser/indexed_db/indexed_db_value.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb995575964f4bf7451779dda24c52d8b2d3f0db
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_value.h
@@ -0,0 +1,39 @@
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
+
+#include <vector>
+#include "content/browser/indexed_db/indexed_db_blob_info.h"
+
+namespace content {
+
+struct IndexedDBValue {
jsbell 2013/12/18 23:04:40 This seems worth trying to split out and land earl
ericu 2013/12/19 05:19:11 Yup. Or possibly with the IndexedDBBlobInfo, with
+ IndexedDBValue() {
+ }
+ IndexedDBValue(const std::string& input_bits,
+ const std::vector<IndexedDBBlobInfo>& input_blob_info)
+ : bits(input_bits),
+ blob_info(input_blob_info) {
+ DCHECK(!input_blob_info.size() || input_bits.size());
+ }
+
+ void swap(IndexedDBValue& value) {
+ bits.swap(value.bits);
+ blob_info.swap(value.blob_info);
+ }
+
+ bool empty() const { return bits.empty(); }
+ void clear() {
+ bits.clear();
+ blob_info.clear();
+ }
+
+ std::string bits;
+ std::vector<IndexedDBBlobInfo> blob_info;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_

Powered by Google App Engine
This is Rietveld 408576698