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

Unified Diff: Source/core/platform/chromium/support/WebString.cpp

Issue 23456013: Expose latin1 methods in WebString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | public/platform/WebString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/chromium/support/WebString.cpp
diff --git a/Source/core/platform/chromium/support/WebString.cpp b/Source/core/platform/chromium/support/WebString.cpp
index 4b5dd6b5150a70ab631a9f766e4d8746c1b78cb3..e53f739137acbe3f1f90ed838e71bdd18549db77 100644
--- a/Source/core/platform/chromium/support/WebString.cpp
+++ b/Source/core/platform/chromium/support/WebString.cpp
@@ -96,6 +96,22 @@ WebString WebString::fromUTF8(const char* data)
return WTF::String::fromUTF8(data);
}
+std::string WebString::latin1() const
+{
+ WebCString latin1 = WTF::String(m_private.get()).latin1();
+ return std::string(latin1.data(), latin1.length());
abarth-chromium 2013/08/31 18:04:18 WTF:: <--- This prefix isn't needed. Do you actu
davidben 2013/09/03 15:04:56 Removed. I was just going by the UTF-8 ones which
+}
+
+WebString WebString::fromLatin1(const char* data, size_t length)
+{
+ return WTF::String(data, length);
abarth-chromium 2013/08/31 18:04:18 WTF:: <---- No need for this prefix.
davidben 2013/09/03 15:04:56 Done.
+}
+
+WebString WebString::fromLatin1(const char* data)
+{
+ return WTF::String(data);
+}
abarth-chromium 2013/08/31 18:04:18 Do you actually need this function? If not, we sh
davidben 2013/09/03 15:04:56 Removed.
+
bool WebString::equals(const WebString& s) const
{
return equal(m_private.get(), s.m_private.get());
« no previous file with comments | « LayoutTests/TestExpectations ('k') | public/platform/WebString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698