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

Unified Diff: base/pickle.cc

Issue 940783002: Cleanup: Remove wstring methods from base::Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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 | « base/pickle.h ('k') | base/pickle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.cc
diff --git a/base/pickle.cc b/base/pickle.cc
index e66c5baca11bb382cea40489f7335f44b27254fd..6eb207faac60a31f55370c0c4f438526d6b206e1 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -164,18 +164,6 @@ bool PickleIterator::ReadStringPiece(base::StringPiece* result) {
return true;
}
-bool PickleIterator::ReadWString(std::wstring* result) {
- int len;
- if (!ReadInt(&len))
- return false;
- const char* read_from = GetReadPointerAndAdvance(len, sizeof(wchar_t));
- if (!read_from)
- return false;
-
- result->assign(reinterpret_cast<const wchar_t*>(read_from), len);
- return true;
-}
-
bool PickleIterator::ReadString16(string16* result) {
int len;
if (!ReadInt(&len))
@@ -303,14 +291,6 @@ bool Pickle::WriteString(const base::StringPiece& value) {
return WriteBytes(value.data(), static_cast<int>(value.size()));
}
-bool Pickle::WriteWString(const std::wstring& value) {
- if (!WriteInt(static_cast<int>(value.size())))
- return false;
-
- return WriteBytes(value.data(),
- static_cast<int>(value.size() * sizeof(wchar_t)));
-}
-
bool Pickle::WriteString16(const base::StringPiece16& value) {
if (!WriteInt(static_cast<int>(value.size())))
return false;
« no previous file with comments | « base/pickle.h ('k') | base/pickle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698