Index: base/pickle.h |
diff --git a/base/pickle.h b/base/pickle.h |
index f2a198e3f2da9e13be0b4e20f1fcf8460133327b..e8f803b8ed469cf515b41004a3c1d2ef602454d3 100644 |
--- a/base/pickle.h |
+++ b/base/pickle.h |
@@ -13,6 +13,7 @@ |
#include "base/gtest_prod_util.h" |
#include "base/logging.h" |
#include "base/strings/string16.h" |
+#include "base/strings/string_piece.h" |
class Pickle; |
@@ -39,6 +40,7 @@ class BASE_EXPORT PickleIterator { |
bool ReadFloat(float* result) WARN_UNUSED_RESULT; |
bool ReadDouble(double* result) WARN_UNUSED_RESULT; |
bool ReadString(std::string* result) WARN_UNUSED_RESULT; |
+ bool ReadStringPiece(base::StringPiece* result) WARN_UNUSED_RESULT; |
Lei Zhang
2015/02/17 22:37:56
Do you feel it's obvious that the StringPiece's on
brucedawson
2015/02/18 21:41:59
It doesn't hurt to explicitly mention the validity
|
bool ReadWString(std::wstring* result) WARN_UNUSED_RESULT; |
bool ReadString16(base::string16* result) WARN_UNUSED_RESULT; |
Lei Zhang
2015/02/17 22:37:56
Add ReadStringPiece16()?
brucedawson
2015/02/18 21:41:59
Done.
|
@@ -195,7 +197,7 @@ class BASE_EXPORT Pickle { |
bool WriteDouble(double value) { |
return WritePOD(value); |
} |
- bool WriteString(const std::string& value); |
+ bool WriteString(const base::StringPiece& value); |
bool WriteWString(const std::wstring& value); |
bool WriteString16(const base::string16& value); |
Lei Zhang
2015/02/17 22:37:56
Change this to base::StringPiece16 as well? There'
brucedawson
2015/02/18 21:41:59
Done.
|
// "Data" is a blob with a length. When you read it out you will be given the |