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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 typedef std::vector<IndexedDBKey> KeyArray; | 25 typedef std::vector<IndexedDBKey> KeyArray; |
26 | 26 |
27 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. | 27 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. |
28 explicit IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid | 28 explicit IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid |
29 explicit IndexedDBKey(const KeyArray& array); | 29 explicit IndexedDBKey(const KeyArray& array); |
30 explicit IndexedDBKey(const std::string& binary); | 30 explicit IndexedDBKey(const std::string& binary); |
31 explicit IndexedDBKey(const base::string16& string); | 31 explicit IndexedDBKey(const base::string16& string); |
32 IndexedDBKey(double number, | 32 IndexedDBKey(double number, |
33 blink::WebIDBKeyType type); // must be date or number | 33 blink::WebIDBKeyType type); // must be date or number |
| 34 IndexedDBKey(const IndexedDBKey& other); |
34 ~IndexedDBKey(); | 35 ~IndexedDBKey(); |
| 36 IndexedDBKey& operator=(const IndexedDBKey& other); |
35 | 37 |
36 bool IsValid() const; | 38 bool IsValid() const; |
37 | 39 |
38 bool IsLessThan(const IndexedDBKey& other) const; | 40 bool IsLessThan(const IndexedDBKey& other) const; |
39 bool Equals(const IndexedDBKey& other) const; | 41 bool Equals(const IndexedDBKey& other) const; |
40 | 42 |
41 blink::WebIDBKeyType type() const { return type_; } | 43 blink::WebIDBKeyType type() const { return type_; } |
42 const std::vector<IndexedDBKey>& array() const { return array_; } | 44 const std::vector<IndexedDBKey>& array() const { return array_; } |
43 const std::string& binary() const { return binary_; } | 45 const std::string& binary() const { return binary_; } |
44 const base::string16& string() const { return string_; } | 46 const base::string16& string() const { return string_; } |
(...skipping 11 matching lines...) Expand all Loading... |
56 base::string16 string_; | 58 base::string16 string_; |
57 double date_; | 59 double date_; |
58 double number_; | 60 double number_; |
59 | 61 |
60 size_t size_estimate_; | 62 size_t size_estimate_; |
61 }; | 63 }; |
62 | 64 |
63 } // namespace content | 65 } // namespace content |
64 | 66 |
65 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | 67 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ |
OLD | NEW |