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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc

Issue 290173008: Refactor PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months 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_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
===================================================================
--- chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc (revision 271871)
+++ chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc (working copy)
@@ -142,10 +142,8 @@
protected:
std::string FormatMessage(const std::string& message) {
- Pickle pickle;
- pickle.WriteString(message);
- return std::string(const_cast<const Pickle*>(&pickle)->payload(),
- pickle.payload_size());
+ uint32_t length = message.length();
+ return std::string(reinterpret_cast<char*>(&length), 4).append(message);
}
base::FilePath CreateTempFileWithMessage(const std::string& message) {
« no previous file with comments | « base/pickle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698