| OLD | NEW |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 return new IDBKey(); | 44 return new IDBKey(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 static IDBKey* createNumber(double number) | 47 static IDBKey* createNumber(double number) |
| 48 { | 48 { |
| 49 return new IDBKey(NumberType, number); | 49 return new IDBKey(NumberType, number); |
| 50 } | 50 } |
| 51 | 51 |
| 52 static IDBKey* createBinary(PassRefPtr<SharedBuffer> binary) | 52 static IDBKey* createBinary(PassRefPtr<SharedBuffer> binary) |
| 53 { | 53 { |
| 54 return new IDBKey(binary); | 54 return new IDBKey(std::move(binary)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 static IDBKey* createString(const String& string) | 57 static IDBKey* createString(const String& string) |
| 58 { | 58 { |
| 59 return new IDBKey(string); | 59 return new IDBKey(string); |
| 60 } | 60 } |
| 61 | 61 |
| 62 static IDBKey* createDate(double date) | 62 static IDBKey* createDate(double date) |
| 63 { | 63 { |
| 64 return new IDBKey(DateType, date); | 64 return new IDBKey(DateType, date); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 const Type m_type; | 154 const Type m_type; |
| 155 const KeyArray m_array; | 155 const KeyArray m_array; |
| 156 RefPtr<SharedBuffer> m_binary; | 156 RefPtr<SharedBuffer> m_binary; |
| 157 const String m_string; | 157 const String m_string; |
| 158 const double m_number = 0; | 158 const double m_number = 0; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| 162 | 162 |
| 163 #endif // IDBKey_h | 163 #endif // IDBKey_h |
| OLD | NEW |