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
);
21 IndexedDBValue(const IndexedDBValue
& other
);
23 IndexedDBValue
& operator=(const IndexedDBValue
& other
);
25 void swap(IndexedDBValue
& value
) {
26 bits
.swap(value
.bits
);
27 blob_info
.swap(value
.blob_info
);
30 bool empty() const { return bits
.empty(); }
36 size_t SizeEstimate() const {
37 return bits
.size() + blob_info
.size() * sizeof(IndexedDBBlobInfo
);
41 std::vector
<IndexedDBBlobInfo
> blob_info
;
44 } // namespace content
46 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_