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

Unified Diff: Source/wtf/text/AtomicString.h

Issue 124003003: Add ascii() / latin1() / utf8() methods to AtomicString to avoid having to call string() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 12 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 | « Source/web/tests/TouchActionTest.cpp ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/AtomicString.h
diff --git a/Source/wtf/text/AtomicString.h b/Source/wtf/text/AtomicString.h
index 3b25e4eaf2dcef93224c19c45a40eb4f306cfe52..e6befd7acb7b9c04ae0552f589870eeea8554c56 100644
--- a/Source/wtf/text/AtomicString.h
+++ b/Source/wtf/text/AtomicString.h
@@ -23,6 +23,7 @@
#include "wtf/HashTableDeletedValueType.h"
#include "wtf/WTFExport.h"
+#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
// Define 'NO_IMPLICIT_ATOMICSTRING' before including this header,
@@ -164,6 +165,10 @@ public:
static AtomicString fromUTF8(const char*, size_t);
static AtomicString fromUTF8(const char*);
+ CString ascii() const { return m_string.ascii(); }
+ CString latin1() const { return m_string.latin1(); }
+ CString utf8(UTF8ConversionMode mode = LenientUTF8Conversion) const { return m_string.utf8(mode); }
+
#ifndef NDEBUG
void show() const;
#endif
« no previous file with comments | « Source/web/tests/TouchActionTest.cpp ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698