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

Unified Diff: Source/modules/background_sync/SyncError.cpp

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing serviceWorkerRegistration.syncManager to interface tests Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/background_sync/SyncError.h ('k') | Source/modules/background_sync/SyncEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/background_sync/SyncError.cpp
diff --git a/Source/modules/push_messaging/PushError.cpp b/Source/modules/background_sync/SyncError.cpp
similarity index 59%
copy from Source/modules/push_messaging/PushError.cpp
copy to Source/modules/background_sync/SyncError.cpp
index 1fd71d92ec679f82123fdba41437d5c93c8d58b0..b37847b1d922b7ef38d990ae8f22c4014ebe4399 100644
--- a/Source/modules/push_messaging/PushError.cpp
+++ b/Source/modules/background_sync/SyncError.cpp
@@ -1,33 +1,33 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
-#include "modules/push_messaging/PushError.h"
+#include "modules/background_sync/SyncError.h"
#include "core/dom/ExceptionCode.h"
#include "wtf/OwnPtr.h"
namespace blink {
-PassRefPtrWillBeRawPtr<DOMException> PushError::take(ScriptPromiseResolver*, WebType* webErrorRaw)
+PassRefPtrWillBeRawPtr<DOMException> SyncError::take(ScriptPromiseResolver*, WebType* webErrorRaw)
{
OwnPtr<WebType> webError = adoptPtr(webErrorRaw);
switch (webError->errorType) {
- case WebPushError::ErrorTypeAbort:
+ case WebSyncError::ErrorTypeAbort:
return DOMException::create(AbortError, webError->message);
- case WebPushError::ErrorTypeNetwork:
- return DOMException::create(NetworkError, webError->message);
- case WebPushError::ErrorTypeNotFound:
+ case WebSyncError::ErrorTypeNoPermission:
+ return DOMException::create(InvalidAccessError, webError->message);
+ case WebSyncError::ErrorTypeNotFound:
return DOMException::create(NotFoundError, webError->message);
- case WebPushError::ErrorTypeUnknown:
+ case WebSyncError::ErrorTypeUnknown:
return DOMException::create(UnknownError, webError->message);
}
ASSERT_NOT_REACHED();
return DOMException::create(UnknownError);
}
-void PushError::dispose(WebType* webErrorRaw)
+void SyncError::dispose(WebType* webErrorRaw)
{
delete webErrorRaw;
}
« no previous file with comments | « Source/modules/background_sync/SyncError.h ('k') | Source/modules/background_sync/SyncEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698