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

Unified Diff: Source/core/platform/network/ResourceError.cpp

Issue 14264012: Create errors (especially cancellation errors) internally to WebCore, rather (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 years, 8 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/core/platform/network/ResourceError.cpp
===================================================================
--- Source/core/platform/network/ResourceError.cpp (revision 148582)
+++ Source/core/platform/network/ResourceError.cpp (working copy)
@@ -27,10 +27,19 @@
#include "config.h"
#include "ResourceError.h"
+#include <public/Platform.h>
+
namespace WebCore {
const char* const errorDomainWebKitInternal = "WebKitInternal";
+ResourceError ResourceError::cancelledError(const String& failingURL)
+{
+ ResourceError error("net", WebKit::Platform::current()->cancelledErrorCode(), failingURL, String());
darin (slow to review) 2013/04/18 05:47:39 Are there any issues with hard-coding "net" here?
+ error.setIsCancellation(true);
+ return error;
+}
+
ResourceError ResourceError::copy() const
{
ResourceError errorCopy;
« no previous file with comments | « Source/core/platform/network/ResourceError.h ('k') | Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698