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_PATH_H_ | 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ |
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ | 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "third_party/WebKit/public/platform/WebIDBTypes.h" | 13 #include "third_party/WebKit/public/platform/WebIDBTypes.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class CONTENT_EXPORT IndexedDBKeyPath { | 17 class CONTENT_EXPORT IndexedDBKeyPath { |
18 public: | 18 public: |
19 IndexedDBKeyPath(); // Defaults to blink::WebIDBKeyPathTypeNull. | 19 IndexedDBKeyPath(); // Defaults to blink::WebIDBKeyPathTypeNull. |
20 explicit IndexedDBKeyPath(const string16&); | 20 explicit IndexedDBKeyPath(const base::string16&); |
21 explicit IndexedDBKeyPath(const std::vector<string16>&); | 21 explicit IndexedDBKeyPath(const std::vector<base::string16>&); |
22 ~IndexedDBKeyPath(); | 22 ~IndexedDBKeyPath(); |
23 | 23 |
24 bool IsNull() const { return type_ == blink::WebIDBKeyPathTypeNull; } | 24 bool IsNull() const { return type_ == blink::WebIDBKeyPathTypeNull; } |
25 bool operator==(const IndexedDBKeyPath& other) const; | 25 bool operator==(const IndexedDBKeyPath& other) const; |
26 | 26 |
27 blink::WebIDBKeyPathType type() const { return type_; } | 27 blink::WebIDBKeyPathType type() const { return type_; } |
28 const std::vector<string16>& array() const; | 28 const std::vector<base::string16>& array() const; |
29 const string16& string() const; | 29 const base::string16& string() const; |
30 | 30 |
31 private: | 31 private: |
32 blink::WebIDBKeyPathType type_; | 32 blink::WebIDBKeyPathType type_; |
33 string16 string_; | 33 base::string16 string_; |
34 std::vector<string16> array_; | 34 std::vector<base::string16> array_; |
35 }; | 35 }; |
36 | 36 |
37 } // namespace content | 37 } // namespace content |
38 | 38 |
39 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ | 39 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ |
OLD | NEW |