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

Unified Diff: ui/gfx/ipc/gfx_param_traits.cc

Issue 818833004: Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « ui/base/dragdrop/os_exchange_data_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ipc/gfx_param_traits.cc
diff --git a/ui/gfx/ipc/gfx_param_traits.cc b/ui/gfx/ipc/gfx_param_traits.cc
index caf1a2362d0b5d80d85619a6af9cec260f06f811..a4a004c01ec7d61748bfec3c7cef2661a6147bbe 100644
--- a/ui/gfx/ipc/gfx_param_traits.cc
+++ b/ui/gfx/ipc/gfx_param_traits.cc
@@ -59,8 +59,8 @@ void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
bool ParamTraits<gfx::Point>::Read(const Message* m, PickleIterator* iter,
gfx::Point* r) {
int x, y;
- if (!m->ReadInt(iter, &x) ||
- !m->ReadInt(iter, &y))
+ if (!iter->ReadInt(&x) ||
+ !iter->ReadInt(&y))
return false;
r->set_x(x);
r->set_y(y);
@@ -103,7 +103,7 @@ bool ParamTraits<gfx::Size>::Read(const Message* m,
PickleIterator* iter,
gfx::Size* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(int) * 2))
+ if (!iter->ReadBytes(&char_values, sizeof(int) * 2))
return false;
const int* values = reinterpret_cast<const int*>(char_values);
if (values[0] < 0 || values[1] < 0)
@@ -126,7 +126,7 @@ bool ParamTraits<gfx::SizeF>::Read(const Message* m,
PickleIterator* iter,
gfx::SizeF* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(float) * 2))
+ if (!iter->ReadBytes(&char_values, sizeof(float) * 2))
return false;
const float* values = reinterpret_cast<const float*>(char_values);
r->set_width(values[0]);
@@ -147,7 +147,7 @@ bool ParamTraits<gfx::Vector2d>::Read(const Message* m,
PickleIterator* iter,
gfx::Vector2d* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(int) * 2))
+ if (!iter->ReadBytes(&char_values, sizeof(int) * 2))
return false;
const int* values = reinterpret_cast<const int*>(char_values);
r->set_x(values[0]);
@@ -168,7 +168,7 @@ bool ParamTraits<gfx::Vector2dF>::Read(const Message* m,
PickleIterator* iter,
gfx::Vector2dF* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(float) * 2))
+ if (!iter->ReadBytes(&char_values, sizeof(float) * 2))
return false;
const float* values = reinterpret_cast<const float*>(char_values);
r->set_x(values[0]);
@@ -189,7 +189,7 @@ bool ParamTraits<gfx::Rect>::Read(const Message* m,
PickleIterator* iter,
gfx::Rect* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(int) * 4))
+ if (!iter->ReadBytes(&char_values, sizeof(int) * 4))
return false;
const int* values = reinterpret_cast<const int*>(char_values);
if (values[2] < 0 || values[3] < 0)
@@ -212,7 +212,7 @@ bool ParamTraits<gfx::RectF>::Read(const Message* m,
PickleIterator* iter,
gfx::RectF* r) {
const char* char_values;
- if (!m->ReadBytes(iter, &char_values, sizeof(float) * 4))
+ if (!iter->ReadBytes(&char_values, sizeof(float) * 4))
return false;
const float* values = reinterpret_cast<const float*>(char_values);
r->SetRect(values[0], values[1], values[2], values[3]);
@@ -241,7 +241,7 @@ bool ParamTraits<SkBitmap>::Read(const Message* m,
SkBitmap* r) {
const char* fixed_data;
int fixed_data_size = 0;
- if (!m->ReadData(iter, &fixed_data, &fixed_data_size) ||
+ if (!iter->ReadData(&fixed_data, &fixed_data_size) ||
(fixed_data_size <= 0)) {
NOTREACHED();
return false;
@@ -251,7 +251,7 @@ bool ParamTraits<SkBitmap>::Read(const Message* m,
const char* variable_data;
int variable_data_size = 0;
- if (!m->ReadData(iter, &variable_data, &variable_data_size) ||
+ if (!iter->ReadData(&variable_data, &variable_data_size) ||
(variable_data_size < 0)) {
NOTREACHED();
return false;
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698