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

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

Issue 136853003: Explicitly implement copy ctor/assignment operator for IndexedDBKey (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually run and pass tests Created 6 years, 11 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
« no previous file with comments | « no previous file | content/common/indexed_db/indexed_db_key.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "third_party/WebKit/public/platform/WebIDBTypes.h" 14 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
15 15
16 namespace blink { 16 namespace blink {
17 class WebIDBKey; 17 class WebIDBKey;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 21
22 class CONTENT_EXPORT IndexedDBKey { 22 class CONTENT_EXPORT IndexedDBKey {
23 public: 23 public:
24 typedef std::vector<IndexedDBKey> KeyArray; 24 typedef std::vector<IndexedDBKey> KeyArray;
25 25
26 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. 26 IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid.
27 IndexedDBKey(const IndexedDBKey& other);
28 IndexedDBKey& operator=(const IndexedDBKey& other);
29
27 IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid 30 IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid
28 explicit IndexedDBKey(const KeyArray& array); 31 explicit IndexedDBKey(const KeyArray& array);
29 explicit IndexedDBKey(const std::string& binary); 32 explicit IndexedDBKey(const std::string& binary);
30 explicit IndexedDBKey(const base::string16& str); 33 explicit IndexedDBKey(const base::string16& str);
31 IndexedDBKey(double number, 34 IndexedDBKey(double number,
32 blink::WebIDBKeyType type); // must be date or number 35 blink::WebIDBKeyType type); // must be date or number
33 ~IndexedDBKey(); 36 ~IndexedDBKey();
34 37
35 bool IsValid() const; 38 bool IsValid() const;
36 39
(...skipping 17 matching lines...) Expand all
54 base::string16 string_; 57 base::string16 string_;
55 double date_; 58 double date_;
56 double number_; 59 double number_;
57 60
58 size_t size_estimate_; 61 size_t size_estimate_;
59 }; 62 };
60 63
61 } // namespace content 64 } // namespace content
62 65
63 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_ 66 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/indexed_db/indexed_db_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698