| 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); | |
| 35 ~IndexedDBKey(); | 34 ~IndexedDBKey(); |
| 36 | 35 |
| 37 IndexedDBKey& operator=(const IndexedDBKey& other); | |
| 38 | |
| 39 bool IsValid() const; | 36 bool IsValid() const; |
| 40 | 37 |
| 41 bool IsLessThan(const IndexedDBKey& other) const; | 38 bool IsLessThan(const IndexedDBKey& other) const; |
| 42 bool Equals(const IndexedDBKey& other) const; | 39 bool Equals(const IndexedDBKey& other) const; |
| 43 | 40 |
| 44 blink::WebIDBKeyType type() const { return type_; } | 41 blink::WebIDBKeyType type() const { return type_; } |
| 45 const std::vector<IndexedDBKey>& array() const { return array_; } | 42 const std::vector<IndexedDBKey>& array() const { return array_; } |
| 46 const std::string& binary() const { return binary_; } | 43 const std::string& binary() const { return binary_; } |
| 47 const base::string16& string() const { return string_; } | 44 const base::string16& string() const { return string_; } |
| 48 double date() const { return date_; } | 45 double date() const { return date_; } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 59 base::string16 string_; | 56 base::string16 string_; |
| 60 double date_; | 57 double date_; |
| 61 double number_; | 58 double number_; |
| 62 | 59 |
| 63 size_t size_estimate_; | 60 size_t size_estimate_; |
| 64 }; | 61 }; |
| 65 | 62 |
| 66 } // namespace content | 63 } // namespace content |
| 67 | 64 |
| 68 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ | 65 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ |
| OLD | NEW |