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

Unified Diff: content/public/common/common_param_traits.cc

Issue 10442072: Move ParamTraits<base::PlatformFileInfo> and <base::PlatformFileError>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « content/public/common/common_param_traits.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/common_param_traits.cc
===================================================================
--- content/public/common/common_param_traits.cc (revision 138610)
+++ content/public/common/common_param_traits.cc (working copy)
@@ -403,49 +403,6 @@
LogParam("IPEndPoint:" + p.ToString(), l);
}
-void ParamTraits<base::PlatformFileInfo>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.size);
- WriteParam(m, p.is_directory);
- WriteParam(m, p.last_modified.ToDoubleT());
- WriteParam(m, p.last_accessed.ToDoubleT());
- WriteParam(m, p.creation_time.ToDoubleT());
-}
-
-bool ParamTraits<base::PlatformFileInfo>::Read(
- const Message* m, PickleIterator* iter, param_type* p) {
- double last_modified;
- double last_accessed;
- double creation_time;
- bool result =
- ReadParam(m, iter, &p->size) &&
- ReadParam(m, iter, &p->is_directory) &&
- ReadParam(m, iter, &last_modified) &&
- ReadParam(m, iter, &last_accessed) &&
- ReadParam(m, iter, &creation_time);
- if (result) {
- p->last_modified = base::Time::FromDoubleT(last_modified);
- p->last_accessed = base::Time::FromDoubleT(last_accessed);
- p->creation_time = base::Time::FromDoubleT(creation_time);
- }
- return result;
-}
-
-void ParamTraits<base::PlatformFileInfo>::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.size, l);
- l->append(",");
- LogParam(p.is_directory, l);
- l->append(",");
- LogParam(p.last_modified.ToDoubleT(), l);
- l->append(",");
- LogParam(p.last_accessed.ToDoubleT(), l);
- l->append(",");
- LogParam(p.creation_time.ToDoubleT(), l);
- l->append(")");
-}
-
void ParamTraits<content::Referrer>::Write(
Message* m, const param_type& p) {
WriteParam(m, p.url);
« no previous file with comments | « content/public/common/common_param_traits.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698