Apply _RELATIVE relocations ahead of others.
[chromium-blink-merge.git] / content / browser / indexed_db / indexed_db_value.h
blobd313038dd697cac56c496e73194f35ff38c0ec4e
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_
8 #include <algorithm>
9 #include <string>
10 #include <vector>
12 #include "content/browser/indexed_db/indexed_db_blob_info.h"
13 #include "content/common/content_export.h"
15 namespace content {
17 struct CONTENT_EXPORT IndexedDBValue {
18 IndexedDBValue();
19 IndexedDBValue(const std::string& input_bits,
20 const std::vector<IndexedDBBlobInfo>& input_blob_info);
21 ~IndexedDBValue();
23 void swap(IndexedDBValue& value) {
24 bits.swap(value.bits);
25 blob_info.swap(value.blob_info);
28 bool empty() const { return bits.empty(); }
29 void clear() {
30 bits.clear();
31 blob_info.clear();
34 size_t SizeEstimate() const {
35 return bits.size() + blob_info.size() * sizeof(IndexedDBBlobInfo);
38 std::string bits;
39 std::vector<IndexedDBBlobInfo> blob_info;
42 } // namespace content
44 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_