1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
12 #include "content/browser/indexed_db/indexed_db_blob_info.h"
13 #include "content/common/content_export.h"
17 struct CONTENT_EXPORT IndexedDBValue
{
19 IndexedDBValue(const std::string
& input_bits
,
20 const std::vector
<IndexedDBBlobInfo
>& input_blob_info
);
23 void swap(IndexedDBValue
& value
) {
24 bits
.swap(value
.bits
);
25 blob_info
.swap(value
.blob_info
);
28 bool empty() const { return bits
.empty(); }
34 size_t SizeEstimate() const {
35 return bits
.size() + blob_info
.size() * sizeof(IndexedDBBlobInfo
);
39 std::vector
<IndexedDBBlobInfo
> blob_info
;
42 } // namespace content
44 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_