Index: third_party/WebKit/Source/wtf/text/CString.h |
diff --git a/third_party/WebKit/Source/wtf/text/CString.h b/third_party/WebKit/Source/wtf/text/CString.h |
index 08e51027e774748d32f6336d76d19f32af7a41e7..eeb7c80b1bb19a5f7d680874eaa2fe1092561456 100644 |
--- a/third_party/WebKit/Source/wtf/text/CString.h |
+++ b/third_party/WebKit/Source/wtf/text/CString.h |
@@ -29,6 +29,7 @@ |
#include "wtf/RefCounted.h" |
#include "wtf/RefPtr.h" |
#include "wtf/WTFExport.h" |
+#include <string> |
namespace WTF { |
@@ -64,6 +65,11 @@ public: |
CString(CStringBuffer* buffer) : m_buffer(buffer) { } |
static CString newUninitialized(size_t length, char*& characterBuffer); |
+ std::string toStdString() const |
+ { |
+ return std::string(data(), length()); |
+ } |
+ |
const char* data() const |
{ |
return m_buffer ? m_buffer->data() : 0; |