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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerError.cpp

Issue 27278002: Add an Error class for ServiceWorkers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: enum for error type, document ownership Created 7 years, 2 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: Source/modules/serviceworkers/ServiceWorkerError.cpp
diff --git a/Source/core/rendering/RenderingNodeProxy.cpp b/Source/modules/serviceworkers/ServiceWorkerError.cpp
similarity index 78%
copy from Source/core/rendering/RenderingNodeProxy.cpp
copy to Source/modules/serviceworkers/ServiceWorkerError.cpp
index 303972ba1e224ed6bdda2c67043fa07b1bc22c1e..6e20535ef48bd3fdb12c4919c7c0a3e3a77ba7c8 100644
--- a/Source/core/rendering/RenderingNodeProxy.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerError.cpp
@@ -29,24 +29,20 @@
*/
#include "config.h"
-#include "core/rendering/RenderingNodeProxy.h"
-
-#include "core/dom/Node.h"
+#include "ServiceWorkerError.h"
+using WebKit::WebServiceWorkerError;
namespace WebCore {
-RenderingNodeProxy::RenderingNodeProxy(Node* node)
- : m_node(node)
-{
-}
-
-RenderingNodeProxy::~RenderingNodeProxy()
-{
-}
-
-bool RenderingNodeProxy::hasTagName(const QualifiedName& tagName) const
+const String& ServiceWorkerError::GetErrorString(WebKit::WebServiceWorkerError::ErrorType type)
{
- return m_node->hasTagName(tagName);
+ DEFINE_STATIC_LOCAL(AtomicString, registrationError, ("RegistrationError", AtomicString::ConstructFromLiteral));
kinuko 2013/10/15 23:44:44 This is not thread safe, I think we could simply u
michaeln 2013/10/16 01:19:16 this function looks iffy from a threading point of
+ switch (type) {
+ case WebServiceWorkerError::RegistrationError:
+ return registrationError;
+ default:
+ ASSERT_NOT_REACHED();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698