diff options
author | jam <jam@chromium.org> | 2016-02-08 18:13:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 02:13:58 +0000 |
commit | b82272abe4f64121f0bdd95f18f84c7455420cf6 (patch) | |
tree | c919adf0f1cb543c59f0aedb175f005fbd8acfdf /extensions/common/extension_messages.cc | |
parent | c11d345c76dbf3ad45fdb45d7818f3709f551bf0 (diff) | |
download | chromium_src-b82272abe4f64121f0bdd95f18f84c7455420cf6.zip chromium_src-b82272abe4f64121f0bdd95f18f84c7455420cf6.tar.gz chromium_src-b82272abe4f64121f0bdd95f18f84c7455420cf6.tar.bz2 |
Switch extension struct members that are sent over IPC to use uint32_t instead of size_t.
size_t's size depends on the architecture. We need IPCs to match as we're now going to support 32 and 64 bit processes communicating on Android.
This is split off from https://codereview.chromium.org/1619363002/.
BUG=581409
Review URL: https://codereview.chromium.org/1676093003
Cr-Commit-Position: refs/heads/master@{#374268}
Diffstat (limited to 'extensions/common/extension_messages.cc')
-rw-r--r-- | extensions/common/extension_messages.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/extensions/common/extension_messages.cc b/extensions/common/extension_messages.cc index 5cccc11..d6ab4f2 100644 --- a/extensions/common/extension_messages.cc +++ b/extensions/common/extension_messages.cc @@ -187,7 +187,7 @@ void ParamTraits<APIPermissionSet>::Write(base::Pickle* m, const param_type& p) { APIPermissionSet::const_iterator it = p.begin(); const APIPermissionSet::const_iterator end = p.end(); - WriteParam(m, p.size()); + WriteParam(m, static_cast<uint32_t>(p.size())); for (; it != end; ++it) { WriteParam(m, it->id()); it->Write(m); @@ -197,10 +197,10 @@ void ParamTraits<APIPermissionSet>::Write(base::Pickle* m, bool ParamTraits<APIPermissionSet>::Read(const base::Pickle* m, base::PickleIterator* iter, param_type* r) { - size_t size; + uint32_t size; if (!ReadParam(m, iter, &size)) return false; - for (size_t i = 0; i < size; ++i) { + for (uint32_t i = 0; i < size; ++i) { APIPermission::ID id; if (!ReadParam(m, iter, &id)) return false; @@ -225,7 +225,7 @@ void ParamTraits<ManifestPermissionSet>::Write(base::Pickle* m, const param_type& p) { ManifestPermissionSet::const_iterator it = p.begin(); const ManifestPermissionSet::const_iterator end = p.end(); - WriteParam(m, p.size()); + WriteParam(m, static_cast<uint32_t>(p.size())); for (; it != end; ++it) { WriteParam(m, it->name()); it->Write(m); @@ -235,10 +235,10 @@ void ParamTraits<ManifestPermissionSet>::Write(base::Pickle* m, bool ParamTraits<ManifestPermissionSet>::Read(const base::Pickle* m, base::PickleIterator* iter, param_type* r) { - size_t size; + uint32_t size; if (!ReadParam(m, iter, &size)) return false; - for (size_t i = 0; i < size; ++i) { + for (uint32_t i = 0; i < size; ++i) { std::string name; if (!ReadParam(m, iter, &name)) return false; |