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

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

Issue 1810843002: DevTools: split protocol Dispatcher into Backend interface and the dispatcher itself. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/inspector_protocol/Dispatcher.h" 8 #include "platform/inspector_protocol/Dispatcher.h"
9 #include "platform/inspector_protocol/TypeBuilder.h" 9 #include "platform/inspector_protocol/TypeBuilder.h"
10 #include "platform/inspector_protocol/Values.h" 10 #include "platform/inspector_protocol/Values.h"
(...skipping 18 matching lines...) Expand all
29 #include "wtf/RefPtr.h" 29 #include "wtf/RefPtr.h"
30 #include "wtf/Vector.h" 30 #include "wtf/Vector.h"
31 #include "wtf/text/StringBuilder.h" 31 #include "wtf/text/StringBuilder.h"
32 32
33 #include <algorithm> 33 #include <algorithm>
34 34
35 using blink::protocol::Array; 35 using blink::protocol::Array;
36 using blink::protocol::CacheStorage::Cache; 36 using blink::protocol::CacheStorage::Cache;
37 using blink::protocol::CacheStorage::DataEntry; 37 using blink::protocol::CacheStorage::DataEntry;
38 38
39 typedef blink::protocol::Dispatcher::CacheStorageCommandHandler::DeleteCacheCall back DeleteCacheCallback; 39 typedef blink::protocol::Backend::CacheStorage::DeleteCacheCallback DeleteCacheC allback;
40 typedef blink::protocol::Dispatcher::CacheStorageCommandHandler::DeleteEntryCall back DeleteEntryCallback; 40 typedef blink::protocol::Backend::CacheStorage::DeleteEntryCallback DeleteEntryC allback;
41 typedef blink::protocol::Dispatcher::CacheStorageCommandHandler::RequestCacheNam esCallback RequestCacheNamesCallback; 41 typedef blink::protocol::Backend::CacheStorage::RequestCacheNamesCallback Reques tCacheNamesCallback;
42 typedef blink::protocol::Dispatcher::CacheStorageCommandHandler::RequestEntriesC allback RequestEntriesCallback; 42 typedef blink::protocol::Backend::CacheStorage::RequestEntriesCallback RequestEn triesCallback;
43 typedef blink::protocol::Dispatcher::CallbackBase RequestCallback; 43 typedef blink::protocol::Dispatcher::CallbackBase RequestCallback;
44 typedef blink::WebServiceWorkerCache::BatchOperation BatchOperation; 44 typedef blink::WebServiceWorkerCache::BatchOperation BatchOperation;
45 45
46 namespace blink { 46 namespace blink {
47 47
48 namespace { 48 namespace {
49 49
50 String buildCacheId(const String& securityOrigin, const String& cacheName) 50 String buildCacheId(const String& securityOrigin, const String& cacheName)
51 { 51 {
52 String id(securityOrigin); 52 String id(securityOrigin);
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 OwnPtr<WebServiceWorkerCacheStorage> cache = assertCacheStorageAndNameForId( errorString, cacheId, &cacheName); 464 OwnPtr<WebServiceWorkerCacheStorage> cache = assertCacheStorageAndNameForId( errorString, cacheId, &cacheName);
465 if (!cache) { 465 if (!cache) {
466 callback->sendFailure(*errorString); 466 callback->sendFailure(*errorString);
467 return; 467 return;
468 } 468 }
469 cache->dispatchOpen(new GetCacheForDeleteEntry(request, cacheName, callback) , WebString(cacheName)); 469 cache->dispatchOpen(new GetCacheForDeleteEntry(request, cacheName, callback) , WebString(cacheName));
470 } 470 }
471 471
472 472
473 } // namespace blink 473 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698