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

Unified Diff: ipc/ipc_message_utils.cc

Issue 12193012: Merge 179141 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 10 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 | « content/browser/download/save_package_unittest.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
===================================================================
--- ipc/ipc_message_utils.cc (revision 180507)
+++ ipc/ipc_message_utils.cc (working copy)
@@ -499,20 +499,13 @@
#endif // defined(OS_POSIX)
void ParamTraits<FilePath>::Write(Message* m, const param_type& p) {
- ParamTraits<FilePath::StringType>::Write(m, p.value());
+ p.WriteToPickle(m);
}
bool ParamTraits<FilePath>::Read(const Message* m,
PickleIterator* iter,
param_type* r) {
- FilePath::StringType value;
- if (!ParamTraits<FilePath::StringType>::Read(m, iter, &value))
- return false;
- // Reject embedded NULs as they can cause security checks to go awry.
- if (value.find(FILE_PATH_LITERAL('\0')) != FilePath::StringType::npos)
- return false;
- *r = FilePath(value);
- return true;
+ return r->ReadFromPickle(iter);
}
void ParamTraits<FilePath>::Log(const param_type& p, std::string* l) {
« no previous file with comments | « content/browser/download/save_package_unittest.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698