| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ |
| 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" | 16 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| 17 | 17 |
| 18 namespace blink { | |
| 19 class WebIDBKey; | |
| 20 } | |
| 21 | |
| 22 namespace content { | 18 namespace content { |
| 23 | 19 |
| 24 class CONTENT_EXPORT IndexedDBKey { | 20 class CONTENT_EXPORT IndexedDBKey { |
| 25 public: | 21 public: |
| 26 typedef std::vector<IndexedDBKey> KeyArray; | 22 typedef std::vector<IndexedDBKey> KeyArray; |
| 27 | 23 |
| 28 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. | 24 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. |
| 29 explicit IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid | 25 explicit IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid |
| 30 explicit IndexedDBKey(const KeyArray& array); | 26 explicit IndexedDBKey(const KeyArray& array); |
| 31 explicit IndexedDBKey(const std::string& binary); | 27 explicit IndexedDBKey(const std::string& binary); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 72 |
| 77 size_t size_estimate_; | 73 size_t size_estimate_; |
| 78 }; | 74 }; |
| 79 | 75 |
| 80 // An index id, and corresponding set of keys to insert. | 76 // An index id, and corresponding set of keys to insert. |
| 81 using IndexedDBIndexKeys = std::pair<int64_t, std::vector<IndexedDBKey>>; | 77 using IndexedDBIndexKeys = std::pair<int64_t, std::vector<IndexedDBKey>>; |
| 82 | 78 |
| 83 } // namespace content | 79 } // namespace content |
| 84 | 80 |
| 85 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | 81 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ |
| OLD | NEW |