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

Side by Side Diff: third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.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/InspectorCacheStorageAgent.h" 5 #include "modules/cachestorage/InspectorCacheStorageAgent.h"
6 6
7 #include "platform/heap/Handle.h" 7 #include "platform/heap/Handle.h"
8 #include "platform/weborigin/KURL.h" 8 #include "platform/weborigin/KURL.h"
9 #include "platform/weborigin/SecurityOrigin.h" 9 #include "platform/weborigin/SecurityOrigin.h"
10 #include "public/platform/Platform.h" 10 #include "public/platform/Platform.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 m_callback(std::move(callback)) {} 378 m_callback(std::move(callback)) {}
379 ~GetCacheForDeleteEntry() override {} 379 ~GetCacheForDeleteEntry() override {}
380 380
381 void onSuccess(std::unique_ptr<WebServiceWorkerCache> cache) override { 381 void onSuccess(std::unique_ptr<WebServiceWorkerCache> cache) override {
382 auto deleteRequest = 382 auto deleteRequest =
383 WTF::makeUnique<DeleteCacheEntry>(std::move(m_callback)); 383 WTF::makeUnique<DeleteCacheEntry>(std::move(m_callback));
384 BatchOperation deleteOperation; 384 BatchOperation deleteOperation;
385 deleteOperation.operationType = WebServiceWorkerCache::OperationTypeDelete; 385 deleteOperation.operationType = WebServiceWorkerCache::OperationTypeDelete;
386 deleteOperation.request.setURL(KURL(ParsedURLString, m_requestSpec)); 386 deleteOperation.request.setURL(KURL(ParsedURLString, m_requestSpec));
387 Vector<BatchOperation> operations; 387 Vector<BatchOperation> operations;
388 operations.append(deleteOperation); 388 operations.push_back(deleteOperation);
389 cache.release()->dispatchBatch(std::move(deleteRequest), 389 cache.release()->dispatchBatch(std::move(deleteRequest),
390 WebVector<BatchOperation>(operations)); 390 WebVector<BatchOperation>(operations));
391 } 391 }
392 392
393 void onError(WebServiceWorkerCacheError error) override { 393 void onError(WebServiceWorkerCacheError error) override {
394 m_callback->sendFailure(Response::Error(String::format( 394 m_callback->sendFailure(Response::Error(String::format(
395 "Error requesting cache %s: %s", m_cacheName.utf8().data(), 395 "Error requesting cache %s: %s", m_cacheName.utf8().data(),
396 serviceWorkerCacheErrorString(error).data()))); 396 serviceWorkerCacheErrorString(error).data())));
397 } 397 }
398 398
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (!response.isSuccess()) { 484 if (!response.isSuccess()) {
485 callback->sendFailure(response); 485 callback->sendFailure(response);
486 return; 486 return;
487 } 487 }
488 cache->dispatchOpen(WTF::makeUnique<GetCacheForDeleteEntry>( 488 cache->dispatchOpen(WTF::makeUnique<GetCacheForDeleteEntry>(
489 request, cacheName, std::move(callback)), 489 request, cacheName, std::move(callback)),
490 WebString(cacheName)); 490 WebString(cacheName));
491 } 491 }
492 492
493 } // namespace blink 493 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698