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

Unified Diff: base/pickle.cc

Issue 16479: Bring up chrome/common/render_mesages.cc on POSIX. (Closed)
Patch Set: also bring up message_router.cc. Created 12 years 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') | chrome/chrome.xcodeproj/project.pbxproj » ('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 f6ed4cc4c7f3550a190c4918c5fc7030916c3033..aac59df34336ca006528ee638b33102180ced0f9 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -144,6 +144,20 @@ bool Pickle::ReadSize(void** iter, size_t* result) const {
return true;
}
+bool Pickle::ReadUInt32(void** iter, uint32* result) const {
Amanda Walker 2008/12/26 22:06:37 we're ending up with a lot of copies of this funct
+ DCHECK(iter);
+ if (!*iter)
+ *iter = const_cast<char*>(payload());
+
+ if (!IteratorHasRoomFor(*iter, sizeof(*result)))
+ return false;
+
+ memcpy(result, *iter, sizeof(*result));
+
+ UpdateIter(iter, sizeof(*result));
+ return true;
+}
+
bool Pickle::ReadInt64(void** iter, int64* result) const {
DCHECK(iter);
if (!*iter)
« no previous file with comments | « base/pickle.h ('k') | chrome/chrome.xcodeproj/project.pbxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698