Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ | |
| 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_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/WebIDBKeyPath.h" | |
| 15 | |
| 16 class CONTENT_EXPORT IndexedDBKeyPath { | |
|
jam
2012/04/30 16:01:29
nit: please put this in the "content" namespace, t
jsbell
2012/04/30 18:08:23
Done.
| |
| 17 public: | |
| 18 IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPath::NullType. | |
| 19 explicit IndexedDBKeyPath(const WebKit::WebIDBKeyPath& keyPath); | |
| 20 ~IndexedDBKeyPath(); | |
| 21 | |
| 22 void SetNull(); | |
| 23 void SetArray(const std::vector<string16>& array); | |
| 24 void SetString(const string16& string); | |
| 25 void Set(const WebKit::WebIDBKeyPath& key); | |
| 26 | |
| 27 bool IsValid() const; | |
| 28 | |
| 29 WebKit::WebIDBKeyPath::Type type() const { return type_; } | |
| 30 const std::vector<string16>& array() const { return array_; } | |
| 31 const string16& string() const { return string_; } | |
| 32 | |
| 33 operator WebKit::WebIDBKeyPath() const; | |
| 34 | |
| 35 private: | |
| 36 WebKit::WebIDBKeyPath::Type type_; | |
| 37 std::vector<string16> array_; | |
| 38 string16 string_; | |
| 39 }; | |
| 40 | |
| 41 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ | |
| OLD | NEW |