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

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

Issue 2012753003: DevTools: consolidate protocol generators for front-end, backend and type builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #include "platform/heap/Handle.h" 6 #include "platform/heap/Handle.h"
7 #include "platform/inspector_protocol/Dispatcher.h" 7 #include "platform/inspector_protocol/DispatcherBase.h"
8 #include "platform/inspector_protocol/TypeBuilder.h" 8 #include "platform/inspector_protocol/TypeBuilder.h"
9 #include "platform/inspector_protocol/Values.h" 9 #include "platform/inspector_protocol/Values.h"
10 #include "platform/weborigin/KURL.h" 10 #include "platform/weborigin/KURL.h"
11 #include "platform/weborigin/SecurityOrigin.h" 11 #include "platform/weborigin/SecurityOrigin.h"
12 #include "public/platform/Platform.h" 12 #include "public/platform/Platform.h"
13 #include "public/platform/WebSecurityOrigin.h" 13 #include "public/platform/WebSecurityOrigin.h"
14 #include "public/platform/WebString.h" 14 #include "public/platform/WebString.h"
15 #include "public/platform/WebURL.h" 15 #include "public/platform/WebURL.h"
16 #include "public/platform/WebVector.h" 16 #include "public/platform/WebVector.h"
17 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h" 17 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 391 }
392 392
393 private: 393 private:
394 String m_requestSpec; 394 String m_requestSpec;
395 String m_cacheName; 395 String m_cacheName;
396 std::unique_ptr<DeleteEntryCallback> m_callback; 396 std::unique_ptr<DeleteEntryCallback> m_callback;
397 }; 397 };
398 398
399 } // namespace 399 } // namespace
400 400
401 InspectorCacheStorageAgent::InspectorCacheStorageAgent() 401 InspectorCacheStorageAgent::InspectorCacheStorageAgent() = default;
402 : InspectorBaseAgent<InspectorCacheStorageAgent, protocol::CacheStorage::Fro ntend>("CacheStorage")
403 {
404 }
405 402
406 InspectorCacheStorageAgent::~InspectorCacheStorageAgent() { } 403 InspectorCacheStorageAgent::~InspectorCacheStorageAgent() = default;
407 404
408 DEFINE_TRACE(InspectorCacheStorageAgent) 405 DEFINE_TRACE(InspectorCacheStorageAgent)
409 { 406 {
410 InspectorBaseAgent::trace(visitor); 407 InspectorBaseAgent::trace(visitor);
411 } 408 }
412 409
413 void InspectorCacheStorageAgent::requestCacheNames(ErrorString* errorString, con st String& securityOrigin, std::unique_ptr<RequestCacheNamesCallback> callback) 410 void InspectorCacheStorageAgent::requestCacheNames(ErrorString* errorString, con st String& securityOrigin, std::unique_ptr<RequestCacheNamesCallback> callback)
414 { 411 {
415 RefPtr<SecurityOrigin> secOrigin = SecurityOrigin::createFromString(security Origin); 412 RefPtr<SecurityOrigin> secOrigin = SecurityOrigin::createFromString(security Origin);
416 413
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 OwnPtr<WebServiceWorkerCacheStorage> cache = assertCacheStorageAndNameForId( errorString, cacheId, &cacheName); 458 OwnPtr<WebServiceWorkerCacheStorage> cache = assertCacheStorageAndNameForId( errorString, cacheId, &cacheName);
462 if (!cache) { 459 if (!cache) {
463 callback->sendFailure(*errorString); 460 callback->sendFailure(*errorString);
464 return; 461 return;
465 } 462 }
466 cache->dispatchOpen(new GetCacheForDeleteEntry(request, cacheName, std::move (callback)), WebString(cacheName)); 463 cache->dispatchOpen(new GetCacheForDeleteEntry(request, cacheName, std::move (callback)), WebString(cacheName));
467 } 464 }
468 465
469 466
470 } // namespace blink 467 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698