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

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: Created 8 years, 8 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 class CONTENT_EXPORT IndexedDBKeyPath {
17 public:
18 IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPath::NullType.
michaeln 2012/04/23 23:26:19 nit: two spaces prior to // per style guide
jsbell 2012/04/23 23:33:21 Done.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698