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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBKey.h

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool isEqual(const IDBKey* other) const; 108 bool isEqual(const IDBKey* other) const;
109 109
110 // Returns a new key array with invalid keys and duplicates removed. 110 // Returns a new key array with invalid keys and duplicates removed.
111 KeyArray toMultiEntryArray() const; 111 KeyArray toMultiEntryArray() const;
112 112
113 private: 113 private:
114 IDBKey() : m_type(InvalidType) {} 114 IDBKey() : m_type(InvalidType) {}
115 IDBKey(Type type, double number) : m_type(type), m_number(number) {} 115 IDBKey(Type type, double number) : m_type(type), m_number(number) {}
116 explicit IDBKey(const String& value) : m_type(StringType), m_string(value) {} 116 explicit IDBKey(const String& value) : m_type(StringType), m_string(value) {}
117 explicit IDBKey(PassRefPtr<SharedBuffer> value) 117 explicit IDBKey(PassRefPtr<SharedBuffer> value)
118 : m_type(BinaryType), m_binary(value) {} 118 : m_type(BinaryType), m_binary(std::move(value)) {}
119 explicit IDBKey(const KeyArray& keyArray) 119 explicit IDBKey(const KeyArray& keyArray)
120 : m_type(ArrayType), m_array(keyArray) {} 120 : m_type(ArrayType), m_array(keyArray) {}
121 121
122 const Type m_type; 122 const Type m_type;
123 const KeyArray m_array; 123 const KeyArray m_array;
124 RefPtr<SharedBuffer> m_binary; 124 RefPtr<SharedBuffer> m_binary;
125 const String m_string; 125 const String m_string;
126 const double m_number = 0; 126 const double m_number = 0;
127 }; 127 };
128 128
129 } // namespace blink 129 } // namespace blink
130 130
131 #endif // IDBKey_h 131 #endif // IDBKey_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698