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

Unified Diff: chrome/browser/ui/views/extensions/browser_action_drag_data.cc

Issue 9702013: Avoid using Pickle::WriteSize(), which writes an architecture-dependent amount (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 | chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/browser_action_drag_data.cc
===================================================================
--- chrome/browser/ui/views/extensions/browser_action_drag_data.cc (revision 126508)
+++ chrome/browser/ui/views/extensions/browser_action_drag_data.cc (working copy)
@@ -67,7 +67,7 @@
Profile* profile, Pickle* pickle) const {
pickle->WriteBytes(&profile, sizeof(profile));
pickle->WriteString(id_);
- pickle->WriteSize(index_);
+ pickle->WriteUInt64(index_);
}
bool BrowserActionDragData::ReadFromPickle(Pickle* pickle) {
@@ -81,8 +81,10 @@
if (!pickle->ReadString(&data_iterator, &id_))
return false;
- if (!pickle->ReadSize(&data_iterator, &index_))
+ uint64 index;
+ if (!pickle->ReadUInt64(&data_iterator, &index))
return false;
+ index_ = static_cast<size_t>(index);
return true;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698