Chromium Code Reviews| 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..7e7406a9a3239368d83e5ecc99462d523da1eb04 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(QuotaExceededError, webError->message); |
|
jkarlin
2015/02/27 20:08:12
Eventually we'll be able to use PermissionDeniedEr
iclelland
2015/03/02 03:51:10
Done.
|
| + 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; |
| } |