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

Unified Diff: base/pickle.h

Issue 9641005: Remove Pickle::WriteSize() now that it has no remaining callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « no previous file | base/pickle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.h
===================================================================
--- base/pickle.h (revision 128029)
+++ base/pickle.h (working copy)
@@ -31,7 +31,6 @@
bool ReadBool(bool* result) WARN_UNUSED_RESULT;
bool ReadInt(int* result) WARN_UNUSED_RESULT;
bool ReadLong(long* result) WARN_UNUSED_RESULT;
- bool ReadSize(size_t* result) WARN_UNUSED_RESULT;
bool ReadUInt16(uint16* result) WARN_UNUSED_RESULT;
bool ReadUInt32(uint32* result) WARN_UNUSED_RESULT;
bool ReadInt64(int64* result) WARN_UNUSED_RESULT;
@@ -148,9 +147,6 @@
bool ReadLong(PickleIterator* iter, long* result) const {
return iter->ReadLong(result);
}
- bool ReadSize(PickleIterator* iter, size_t* result) const {
- return iter->ReadSize(result);
- }
bool ReadUInt16(PickleIterator* iter, uint16* result) const {
return iter->ReadUInt16(result);
}
@@ -195,12 +191,14 @@
bool WriteInt(int value) {
return WriteBytes(&value, sizeof(value));
}
- bool WriteLong(long value) {
+ // WARNING: DO NOT USE THIS METHOD IF PICKLES ARE PERSISTED IN ANY WAY.
+ // It will write whatever a "long" is on this architecture. On 32-bit
+ // platforms, it is 32 bits. On 64-bit platforms, it is 64 bits. If persisted
+ // pickles are still around after upgrading to 64-bit, or if they are copied
+ // between dissimilar systems, YOUR PICKLES WILL HAVE GONE BAD.
+ bool WriteLongUsingDangerousNonPortableLessPersistableForm(long value) {
return WriteBytes(&value, sizeof(value));
}
- bool WriteSize(size_t value) {
- return WriteBytes(&value, sizeof(value));
- }
bool WriteUInt16(uint16 value) {
return WriteBytes(&value, sizeof(value));
}
« no previous file with comments | « no previous file | base/pickle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698