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_
9 #include "content/browser/indexed_db/indexed_db_blob_info.h"
10 #include "content/common/content_export.h"
14 struct CONTENT_EXPORT IndexedDBValue
{
16 IndexedDBValue(const std::string
& input_bits
,
17 const std::vector
<IndexedDBBlobInfo
>& input_blob_info
);
20 void swap(IndexedDBValue
& value
) {
21 bits
.swap(value
.bits
);
22 blob_info
.swap(value
.blob_info
);
25 bool empty() const { return bits
.empty(); }
31 size_t SizeEstimate() const {
32 return bits
.size() + blob_info
.size() * sizeof(IndexedDBBlobInfo
);
36 std::vector
<IndexedDBBlobInfo
> blob_info
;
39 } // namespace content
41 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_