Index: third_party/WebKit/Source/platform/network/ResourceError.cpp |
diff --git a/third_party/WebKit/Source/platform/network/ResourceError.cpp b/third_party/WebKit/Source/platform/network/ResourceError.cpp |
index 965065ed211dfb684fa3e23941383294599cb99b..4192904f5152cb2b8ec46e01b811a78a97171d53 100644 |
--- a/third_party/WebKit/Source/platform/network/ResourceError.cpp |
+++ b/third_party/WebKit/Source/platform/network/ResourceError.cpp |
@@ -26,6 +26,7 @@ |
#include "platform/network/ResourceError.h" |
+#include "net/base/net_errors.h" |
#include "platform/weborigin/KURL.h" |
#include "public/platform/Platform.h" |
#include "public/platform/WebURL.h" |
@@ -46,6 +47,13 @@ ResourceError ResourceError::cancelledDueToAccessCheckError( |
return error; |
} |
+ResourceError ResourceError::cacheMissError() { |
+ ResourceError error; |
yhirano
2016/10/25 08:50:28
error.m_domain = String(net::kErrorDomain);
|
+ error.m_errorCode = net::ERR_CACHE_MISS; |
+ error.m_isNull = false; |
+ return error; |
+} |
+ |
ResourceError ResourceError::copy() const { |
ResourceError errorCopy; |
errorCopy.m_domain = m_domain.isolatedCopy(); |
@@ -61,6 +69,10 @@ ResourceError ResourceError::copy() const { |
return errorCopy; |
} |
+bool ResourceError::isCacheMiss() const { |
+ return m_errorCode == net::ERR_CACHE_MISS; |
yhirano
2016/10/25 08:50:28
We need to check m_domain as well.
|
+} |
+ |
bool ResourceError::compare(const ResourceError& a, const ResourceError& b) { |
if (a.isNull() && b.isNull()) |
return true; |