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

Unified Diff: third_party/WebKit/public/platform/WebString.h

Issue 1768063002: Introduce String::fromUTF8Lenient() and use it for cache_name in CacheStorage API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/public/platform/WebString.h
diff --git a/third_party/WebKit/public/platform/WebString.h b/third_party/WebKit/public/platform/WebString.h
index 8e4bbcc473ca4f4d985f70d943cf953a5734dfad..72059488513de70db7f7f50c6f00add9c1a5d25c 100644
--- a/third_party/WebKit/public/platform/WebString.h
+++ b/third_party/WebKit/public/platform/WebString.h
@@ -95,6 +95,13 @@ public:
return fromUTF8(s.data(), s.length());
}
+ BLINK_COMMON_EXPORT static WebString fromUTF8Lenient(const char* data, size_t length);
+
+ static WebString fromUTF8Lenient(const std::string& s)
+ {
+ return fromUTF8Lenient(s.data(), s.length());
+ }
+
BLINK_COMMON_EXPORT std::string latin1() const;
BLINK_COMMON_EXPORT static WebString fromLatin1(const WebLChar* data, size_t length);

Powered by Google App Engine
This is Rietveld 408576698