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

Side by Side Diff: third_party/WebKit/Source/web/WebIDBKey.cpp

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 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
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void WebIDBKey::assign(const WebIDBKey& value) { 80 void WebIDBKey::assign(const WebIDBKey& value) {
81 m_private = value.m_private; 81 m_private = value.m_private;
82 } 82 }
83 83
84 static IDBKey* convertFromWebIDBKeyArray(const WebVector<WebIDBKey>& array) { 84 static IDBKey* convertFromWebIDBKeyArray(const WebVector<WebIDBKey>& array) {
85 IDBKey::KeyArray keys; 85 IDBKey::KeyArray keys;
86 keys.reserveCapacity(array.size()); 86 keys.reserveCapacity(array.size());
87 for (size_t i = 0; i < array.size(); ++i) { 87 for (size_t i = 0; i < array.size(); ++i) {
88 switch (array[i].keyType()) { 88 switch (array[i].keyType()) {
89 case WebIDBKeyTypeArray: 89 case WebIDBKeyTypeArray:
90 keys.append(convertFromWebIDBKeyArray(array[i].array())); 90 keys.push_back(convertFromWebIDBKeyArray(array[i].array()));
91 break; 91 break;
92 case WebIDBKeyTypeBinary: 92 case WebIDBKeyTypeBinary:
93 keys.append(IDBKey::createBinary(array[i].binary())); 93 keys.push_back(IDBKey::createBinary(array[i].binary()));
94 break; 94 break;
95 case WebIDBKeyTypeString: 95 case WebIDBKeyTypeString:
96 keys.append(IDBKey::createString(array[i].string())); 96 keys.push_back(IDBKey::createString(array[i].string()));
97 break; 97 break;
98 case WebIDBKeyTypeDate: 98 case WebIDBKeyTypeDate:
99 keys.append(IDBKey::createDate(array[i].date())); 99 keys.push_back(IDBKey::createDate(array[i].date()));
100 break; 100 break;
101 case WebIDBKeyTypeNumber: 101 case WebIDBKeyTypeNumber:
102 keys.append(IDBKey::createNumber(array[i].number())); 102 keys.push_back(IDBKey::createNumber(array[i].number()));
103 break; 103 break;
104 case WebIDBKeyTypeInvalid: 104 case WebIDBKeyTypeInvalid:
105 keys.append(IDBKey::createInvalid()); 105 keys.push_back(IDBKey::createInvalid());
106 break; 106 break;
107 case WebIDBKeyTypeNull: 107 case WebIDBKeyTypeNull:
108 case WebIDBKeyTypeMin: 108 case WebIDBKeyTypeMin:
109 NOTREACHED(); 109 NOTREACHED();
110 break; 110 break;
111 } 111 }
112 } 112 }
113 return IDBKey::createArray(keys); 113 return IDBKey::createArray(keys);
114 } 114 }
115 115
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 double WebIDBKey::date() const { 204 double WebIDBKey::date() const {
205 return m_private->date(); 205 return m_private->date();
206 } 206 }
207 207
208 double WebIDBKey::number() const { 208 double WebIDBKey::number() const {
209 return m_private->number(); 209 return m_private->number();
210 } 210 }
211 211
212 } // namespace blink 212 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebHistoryItem.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698