| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_INDEXED_DB_KEY_H_ | |
| 6 #define CONTENT_COMMON_INDEXED_DB_KEY_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/string16.h" | |
| 13 #include "content/common/content_export.h" | |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" | |
| 15 | |
| 16 class CONTENT_EXPORT IndexedDBKey { | |
| 17 public: | |
| 18 IndexedDBKey(); // Defaults to WebKit::WebIDBKey::InvalidType. | |
| 19 explicit IndexedDBKey(const WebKit::WebIDBKey& key); | |
| 20 ~IndexedDBKey(); | |
| 21 | |
| 22 void SetInvalid(); | |
| 23 void SetArray(const std::vector<IndexedDBKey>& array); | |
| 24 void SetString(const string16& string); | |
| 25 void SetDate(double date); | |
| 26 void SetNumber(double number); | |
| 27 void Set(const WebKit::WebIDBKey& key); | |
| 28 | |
| 29 WebKit::WebIDBKey::Type type() const { return type_; } | |
| 30 const std::vector<IndexedDBKey>& array() const { return array_; } | |
| 31 const string16& string() const { return string_; } | |
| 32 double date() const { return date_; } | |
| 33 double number() const { return number_; } | |
| 34 | |
| 35 operator WebKit::WebIDBKey() const; | |
| 36 | |
| 37 private: | |
| 38 WebKit::WebIDBKey::Type type_; | |
| 39 std::vector<IndexedDBKey> array_; | |
| 40 string16 string_; | |
| 41 double date_; | |
| 42 double number_; | |
| 43 }; | |
| 44 | |
| 45 #endif // CONTENT_COMMON_INDEXED_DB_KEY_H_ | |
| OLD | NEW |