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

Unified Diff: sky/engine/wtf/text/CString.h

Issue 678683004: HTMLImportLoader should talk directly to mojo::NetworkService (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address reviewer comments Created 6 years, 2 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 | « sky/engine/public/platform/Platform.h ('k') | sky/engine/wtf/text/WTFString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/wtf/text/CString.h
diff --git a/sky/engine/wtf/text/CString.h b/sky/engine/wtf/text/CString.h
index 02a9a30d33c89b2762d5b64181ed23767027ea91..1a51d662d3c42284003cb1622980975699eb5b83 100644
--- a/sky/engine/wtf/text/CString.h
+++ b/sky/engine/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;
« no previous file with comments | « sky/engine/public/platform/Platform.h ('k') | sky/engine/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698