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

Unified Diff: content/common/page_state_serialization.cc

Issue 825353003: Revert of Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « content/common/media/media_param_traits.cc ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/page_state_serialization.cc
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 4d9ea3b0890edca01b65064d9418aaa6c4609e30..d99830a2ce27d8d4f2308a1a2b274bc56acced41 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -211,7 +211,7 @@
void ReadData(SerializeObject* obj, const void** data, int* length) {
const char* tmp;
- if (obj->iter.ReadData(&tmp, length)) {
+ if (obj->pickle.ReadData(&obj->iter, &tmp, length)) {
*data = tmp;
} else {
obj->parse_error = true;
@@ -226,7 +226,7 @@
int ReadInteger(SerializeObject* obj) {
int tmp;
- if (obj->iter.ReadInt(&tmp))
+ if (obj->pickle.ReadInt(&obj->iter, &tmp))
return tmp;
obj->parse_error = true;
return 0;
@@ -238,7 +238,7 @@
int64 ReadInteger64(SerializeObject* obj) {
int64 tmp = 0;
- if (obj->iter.ReadInt64(&tmp))
+ if (obj->pickle.ReadInt64(&obj->iter, &tmp))
return tmp;
obj->parse_error = true;
return 0;
@@ -268,7 +268,7 @@
bool ReadBoolean(SerializeObject* obj) {
bool tmp;
- if (obj->iter.ReadBool(&tmp))
+ if (obj->pickle.ReadBool(&obj->iter, &tmp))
return tmp;
obj->parse_error = true;
return false;
@@ -280,7 +280,7 @@
GURL ReadGURL(SerializeObject* obj) {
std::string spec;
- if (obj->iter.ReadString(&spec))
+ if (obj->pickle.ReadString(&obj->iter, &spec))
return GURL(spec);
obj->parse_error = true;
return GURL();
@@ -292,7 +292,7 @@
std::string ReadStdString(SerializeObject* obj) {
std::string s;
- if (obj->iter.ReadString(&s))
+ if (obj->pickle.ReadString(&obj->iter, &s))
return s;
obj->parse_error = true;
return std::string();
@@ -319,7 +319,7 @@
// read, NULL is returned.
const base::char16* ReadStringNoCopy(SerializeObject* obj, int* num_chars) {
int length_in_bytes;
- if (!obj->iter.ReadInt(&length_in_bytes)) {
+ if (!obj->pickle.ReadInt(&obj->iter, &length_in_bytes)) {
obj->parse_error = true;
return NULL;
}
@@ -328,7 +328,7 @@
return NULL;
const char* data;
- if (!obj->iter.ReadBytes(&data, length_in_bytes)) {
+ if (!obj->pickle.ReadBytes(&obj->iter, &data, length_in_bytes)) {
obj->parse_error = true;
return NULL;
}
« no previous file with comments | « content/common/media/media_param_traits.cc ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698