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; |
} |