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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp

Issue 1702673002: DevTools: migrate remote debugging protocol generators to jinja2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
index 1cf09b6f3d6d73387cb88ccd4d3958187402814f..bcf83470b4d168b594309677e6b97a5d024929d6 100644
--- a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
@@ -123,16 +123,16 @@ public:
void onSuccess(const WebVector<WebString>& caches) override
{
- RefPtr<Array<Cache>> array = Array<Cache>::create();
+ OwnPtr<Array<Cache>> array = Array<Cache>::create();
for (size_t i = 0; i < caches.size(); i++) {
String name = String(caches[i]);
- RefPtr<Cache> entry = Cache::create()
+ OwnPtr<Cache> entry = Cache::create()
.setSecurityOrigin(m_securityOrigin)
.setCacheName(name)
- .setCacheId(buildCacheId(m_securityOrigin, name));
- array->addItem(entry);
+ .setCacheId(buildCacheId(m_securityOrigin, name)).build();
+ array->addItem(entry.release());
}
- m_callback->sendSuccess(array);
+ m_callback->sendSuccess(array.release());
}
void onError(WebServiceWorkerCacheError error) override
@@ -196,14 +196,14 @@ public:
m_responses.remove(m_params.pageSize, m_responses.size() - m_params.pageSize);
hasMore = true;
}
- RefPtr<Array<DataEntry>> array = Array<DataEntry>::create();
+ OwnPtr<Array<DataEntry>> array = Array<DataEntry>::create();
for (const auto& requestResponse : m_responses) {
- RefPtr<DataEntry> entry = DataEntry::create()
+ OwnPtr<DataEntry> entry = DataEntry::create()
.setRequest(requestResponse.request)
- .setResponse(requestResponse.response);
- array->addItem(entry);
+ .setResponse(requestResponse.response).build();
+ array->addItem(entry.release());
}
- m_callback->sendSuccess(array, hasMore);
+ m_callback->sendSuccess(array.release(), hasMore);
}
private:
@@ -261,8 +261,8 @@ public:
void onSuccess(const WebVector<WebServiceWorkerRequest>& requests) override
{
if (requests.isEmpty()) {
- RefPtr<Array<DataEntry>> array = Array<DataEntry>::create();
- m_callback->sendSuccess(array, false);
+ OwnPtr<Array<DataEntry>> array = Array<DataEntry>::create();
+ m_callback->sendSuccess(array.release(), false);
return;
}
RefPtr<ResponsesAccumulator> accumulator = adoptRef(new ResponsesAccumulator(requests.size(), m_params, m_callback));

Powered by Google App Engine
This is Rietveld 408576698