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

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

Issue 10204003: Use WebIDBKeyPath type in WebKit API, implement IndexedDBKeyPath type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move IndexedDBKeyPath to content namespace, formatting nits. Created 8 years, 7 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
(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 namespace content {
17
18 class CONTENT_EXPORT IndexedDBKeyPath {
19 public:
20 IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPath::NullType.
21 explicit IndexedDBKeyPath(const WebKit::WebIDBKeyPath& keyPath);
22 ~IndexedDBKeyPath();
23
24 void SetNull();
25 void SetArray(const std::vector<string16>& array);
26 void SetString(const string16& string);
27 void Set(const WebKit::WebIDBKeyPath& key);
28
29 bool IsValid() const;
30
31 WebKit::WebIDBKeyPath::Type type() const { return type_; }
32 const std::vector<string16>& array() const { return array_; }
33 const string16& string() const { return string_; }
34
35 operator WebKit::WebIDBKeyPath() const;
36
37 private:
38 WebKit::WebIDBKeyPath::Type type_;
39 std::vector<string16> array_;
40 string16 string_;
41 };
42
43 } // namespace content
44
45 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/idbbindingutilities_browsertest.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