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

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: Fix string threadsafety, ownership model 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/html/HTMLMediaSource.cpp b/Source/modules/serviceworkers/ServiceWorkerError.cpp
similarity index 83%
copy from Source/core/html/HTMLMediaSource.cpp
copy to Source/modules/serviceworkers/ServiceWorkerError.cpp
index 7221cfeaf34ed4e40fd174029a3fa66a6d8dd411..8d132cd6982e26e8a174de77885cbad2e2d2ad55 100644
--- a/Source/core/html/HTMLMediaSource.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerError.cpp
@@ -29,16 +29,19 @@
*/
#include "config.h"
-#include "core/html/HTMLMediaSource.h"
+#include "ServiceWorkerError.h"
+using WebKit::WebServiceWorkerError;
namespace WebCore {
-URLRegistry* HTMLMediaSource::s_registry = 0;
-
-void HTMLMediaSource::setRegistry(URLRegistry* registry)
+String ServiceWorkerError::GetErrorString(WebKit::WebServiceWorkerError::ErrorType type)
{
- ASSERT(!s_registry);
- s_registry = registry;
+ switch (type) {
+ case WebServiceWorkerError::RegistrationError:
+ return "RegistrationError";
+ default:
+ ASSERT_NOT_REACHED();
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698