diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 14:29:40 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 14:29:40 +0000 |
commit | 5c71640cdf15c2782b8331e9e2623da50ec5d102 (patch) | |
tree | da7cf7505bb23c3e206bdcaab66f064d3edc5936 /chrome/common/indexed_db_key.h | |
parent | 699f2246bf56e1aadf31e1edd6c5aef9b4b39638 (diff) | |
download | chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.zip chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.tar.gz chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.tar.bz2 |
The Chrome half of implementing get/put/remove for object stores (https://bugs.webkit.org/show_bug.cgi?id=41250).
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2830030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/indexed_db_key.h')
-rw-r--r-- | chrome/common/indexed_db_key.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/common/indexed_db_key.h b/chrome/common/indexed_db_key.h new file mode 100644 index 0000000..13bfae3 --- /dev/null +++ b/chrome/common/indexed_db_key.h @@ -0,0 +1,34 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_COMMON_INDEXED_DB_KEY_H_ +#define CHROME_COMMON_INDEXED_DB_KEY_H_ + +#include "base/basictypes.h" +#include "base/string16.h" +#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h" + +class IndexedDBKey { + public: + IndexedDBKey(); // Defaults to WebKit::WebIDBKey::InvalidType. + explicit IndexedDBKey(const WebKit::WebIDBKey& key); + + void SetNull(); + void SetInvalid(); + void Set(const string16& string); + void Set(int32_t number); + + WebKit::WebIDBKey::Type type() const { return type_; } + const string16& string() const { return string_; } + int32_t number() const { return number_; } + + operator WebKit::WebIDBKey() const; + + private: + WebKit::WebIDBKey::Type type_; + string16 string_; + int32_t number_; +}; + +#endif // CHROME_COMMON_INDEXED_DB_KEY_H_ |