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

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

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 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
« no previous file with comments | « Source/modules/cachestorage/CacheTest.cpp ('k') | Source/modules/geofencing/Geofencing.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
diff --git a/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp b/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
index 2caf39e94de18594101c1b5b3e897d8a29d82272..da01ce9c8940ddf0916173be24e0502134dd161e 100644
--- a/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
+++ b/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
@@ -86,9 +86,9 @@ PassOwnPtr<WebServiceWorkerCacheStorage> assertCacheStorageAndNameForId(ErrorStr
return assertCacheStorage(errorString, securityOrigin);
}
-CString serviceWorkerCacheErrorString(WebServiceWorkerCacheError* error)
+CString serviceWorkerCacheErrorString(WebServiceWorkerCacheError error)
{
- switch (*error) {
+ switch (error) {
case WebServiceWorkerCacheErrorNotImplemented:
return CString("not implemented.");
break;
@@ -133,7 +133,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(*error).data()));
}
private:
@@ -231,7 +231,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting responses for cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting responses for cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(*error).data()));
}
private:
@@ -271,7 +271,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting requests for cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting requests for cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(*error).data()));
}
private:
@@ -300,7 +300,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting cache %s: %s", m_params.cacheName.utf8().data(), serviceWorkerCacheErrorString(*error).data()));
}
private:
@@ -325,7 +325,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(*error).data()));
}
private:
@@ -347,10 +347,9 @@ public:
m_callback->sendSuccess();
}
- void onError(WebPassOwnPtr<WebServiceWorkerCacheError> e)
+ void onError(WebServiceWorkerCacheError error)
{
- OwnPtr<WebServiceWorkerCacheError> error = e.release();
- m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(error.get()).data()));
+ m_callback->sendFailure(String::format("Error requesting cache names: %s", serviceWorkerCacheErrorString(error).data()));
}
private:
@@ -383,7 +382,7 @@ public:
void onError(WebServiceWorkerCacheError* error)
{
- m_callback->sendFailure(String::format("Error requesting cache %s: %s", m_cacheName.utf8().data(), serviceWorkerCacheErrorString(error).data()));
+ m_callback->sendFailure(String::format("Error requesting cache %s: %s", m_cacheName.utf8().data(), serviceWorkerCacheErrorString(*error).data()));
}
private:
« no previous file with comments | « Source/modules/cachestorage/CacheTest.cpp ('k') | Source/modules/geofencing/Geofencing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698