| 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..e881f9ed4e9cbcfc8158d8360eeb5e6294f25120 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,13 @@ public:
|
| CString(CStringBuffer* buffer) : m_buffer(buffer) { }
|
| static CString newUninitialized(size_t length, char*& characterBuffer);
|
|
|
| + // This method should be used ONLY to pass a WTFString to methods outside
|
| + // of blink which take a std::string as an argument.
|
| + std::string toStdString() const
|
| + {
|
| + return std::string(data(), length());
|
| + }
|
| +
|
| const char* data() const
|
| {
|
| return m_buffer ? m_buffer->data() : 0;
|
|
|