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

Unified Diff: third_party/WebKit/Source/platform/exported/WebURLError.cpp

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: switchToSwapPeriod(), Inspector disable cache check workaround Created 4 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: third_party/WebKit/Source/platform/exported/WebURLError.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebURLError.cpp b/third_party/WebKit/Source/platform/exported/WebURLError.cpp
index 3654cae0c736c5442eb870a4fffa03303eb9d270..942bb680ddb6ed3740a1b83a76e53ab49523a042 100644
--- a/third_party/WebKit/Source/platform/exported/WebURLError.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebURLError.cpp
@@ -30,6 +30,7 @@
#include "public/platform/WebURLError.h"
+#include "platform/network/NetworkUtils.h"
#include "platform/network/ResourceError.h"
#include "platform/weborigin/KURL.h"
@@ -65,4 +66,14 @@ WebURLError::operator ResourceError() const {
return resourceError;
}
+WebURLError WebURLError::cacheMissError() {
+ WebURLError error;
+ error.reason = NetworkUtils::cacheMissErrorCode();
kinuko 2016/10/21 10:35:13 This rather looks a little awkward layering workar
kinuko 2016/10/22 04:43:01 Hmm... looking into this a little further, actuall
Shao-Chuan Lee 2016/10/25 04:18:20 I feel like using an enum for mapping from net:: e
+ return error;
+}
+
+bool WebURLError::isCacheMiss() const {
+ return NetworkUtils::isCacheMissErrorCode(reason);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698