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

Unified Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 1524613002: [mojo] Use base::Pickle for Message storage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: happy compiler happy robots Created 5 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 | « mojo/public/cpp/bindings/message.h ('k') | third_party/mojo/mojo_public.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/validation_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index f3ff9abc21b896146c261310ab9041a555d4ac14..7153a59ae9e301c63b6352717897189ec1a9b831 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -148,9 +148,10 @@ bool ReadTestCase(const std::string& test,
return false;
}
- message->AllocUninitializedData(static_cast<uint32_t>(data.size()));
+ message->Initialize(static_cast<uint32_t>(data.size()),
+ false /* zero_initialized */);
if (!data.empty())
- memcpy(message->mutable_data(), &data[0], data.size());
+ memcpy(message->buffer()->Allocate(data.size()), &data[0], data.size());
message->mutable_handles()->resize(num_handles);
return true;
« no previous file with comments | « mojo/public/cpp/bindings/message.h ('k') | third_party/mojo/mojo_public.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698