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

Side by Side Diff: third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "modules/cachestorage/CacheStorage.h" 5 #include "modules/cachestorage/CacheStorage.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 explicit KeysCallbacks(ScriptPromiseResolver* resolver) 199 explicit KeysCallbacks(ScriptPromiseResolver* resolver)
200 : m_resolver(resolver) {} 200 : m_resolver(resolver) {}
201 ~KeysCallbacks() override {} 201 ~KeysCallbacks() override {}
202 202
203 void onSuccess(const WebVector<WebString>& keys) override { 203 void onSuccess(const WebVector<WebString>& keys) override {
204 if (!m_resolver->getExecutionContext() || 204 if (!m_resolver->getExecutionContext() ||
205 m_resolver->getExecutionContext()->isContextDestroyed()) 205 m_resolver->getExecutionContext()->isContextDestroyed())
206 return; 206 return;
207 Vector<String> wtfKeys; 207 Vector<String> wtfKeys;
208 for (size_t i = 0; i < keys.size(); ++i) 208 for (size_t i = 0; i < keys.size(); ++i)
209 wtfKeys.append(keys[i]); 209 wtfKeys.push_back(keys[i]);
210 m_resolver->resolve(wtfKeys); 210 m_resolver->resolve(wtfKeys);
211 m_resolver.clear(); 211 m_resolver.clear();
212 } 212 }
213 213
214 void onError(WebServiceWorkerCacheError reason) override { 214 void onError(WebServiceWorkerCacheError reason) override {
215 if (!m_resolver->getExecutionContext() || 215 if (!m_resolver->getExecutionContext() ||
216 m_resolver->getExecutionContext()->isContextDestroyed()) 216 m_resolver->getExecutionContext()->isContextDestroyed())
217 return; 217 return;
218 m_resolver->reject(CacheStorageError::createException(reason)); 218 m_resolver->reject(CacheStorageError::createException(reason));
219 m_resolver.clear(); 219 m_resolver.clear();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 void CacheStorage::dispose() { 354 void CacheStorage::dispose() {
355 m_webCacheStorage.reset(); 355 m_webCacheStorage.reset();
356 } 356 }
357 357
358 DEFINE_TRACE(CacheStorage) { 358 DEFINE_TRACE(CacheStorage) {
359 visitor->trace(m_scopedFetcher); 359 visitor->trace(m_scopedFetcher);
360 } 360 }
361 361
362 } // namespace blink 362 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698