Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Side by Side Diff: content/common/indexed_db/indexed_db_key_path.h

Issue 19442002: Convert to new WebIDBTypes enums and accessors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content/common/DEPS Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/WebIDBKeyPath.h" 13 #include "third_party/WebKit/public/platform/WebIDBKeyPath.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 WebKit::WebIDBKeyPath::NullType. 19 IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPathTypeNull.
20 explicit IndexedDBKeyPath(const string16&); 20 explicit IndexedDBKeyPath(const string16&);
21 explicit IndexedDBKeyPath(const std::vector<string16>&); 21 explicit IndexedDBKeyPath(const std::vector<string16>&);
22 explicit IndexedDBKeyPath(const WebKit::WebIDBKeyPath&); 22 explicit IndexedDBKeyPath(const WebKit::WebIDBKeyPath&);
23 ~IndexedDBKeyPath(); 23 ~IndexedDBKeyPath();
24 24
25 bool IsNull() const { return type_ == WebKit::WebIDBKeyPath::NullType; } 25 bool IsNull() const { return type_ == WebKit::WebIDBKeyPathTypeNull; }
26 bool IsValid() const; 26 bool IsValid() const;
27 bool operator==(const IndexedDBKeyPath& other) const; 27 bool operator==(const IndexedDBKeyPath& other) const;
28 28
29 WebKit::WebIDBKeyPath::Type type() const { return type_; } 29 WebKit::WebIDBKeyPathType type() const { return type_; }
30 const std::vector<string16>& array() const; 30 const std::vector<string16>& array() const;
31 const string16& string() const; 31 const string16& string() const;
32 operator WebKit::WebIDBKeyPath() const; 32 operator WebKit::WebIDBKeyPath() const;
33 33
34 private: 34 private:
35 WebKit::WebIDBKeyPath::Type type_; 35 WebKit::WebIDBKeyPathType type_;
36 string16 string_; 36 string16 string_;
37 std::vector<string16> array_; 37 std::vector<string16> array_;
38 }; 38 };
39 39
40 } // namespace content 40 } // namespace content
41 41
42 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_ 42 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_key.cc ('k') | content/common/indexed_db/indexed_db_key_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698