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

Unified Diff: ipc/ipc_message_utils.cc

Issue 3069034: FBTF: Reapplies r55259, the first new IPC definition patch. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 41fbde7298774a993791f6921790e2033183cc4b..7975faad8cce35d72e492f3d89ed3da3406fab4a 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -201,6 +201,24 @@ static bool ReadValue(const Message* m, void** iter, Value** value,
return true;
}
+
+void ParamTraits<base::Time>::Write(Message* m, const param_type& p) {
+ ParamTraits<int64>::Write(m, p.ToInternalValue());
+}
+
+bool ParamTraits<base::Time>::Read(const Message* m, void** iter,
+ param_type* r) {
+ int64 value;
+ if (!ParamTraits<int64>::Read(m, iter, &value))
+ return false;
+ *r = base::Time::FromInternalValue(value);
+ return true;
+}
+
+void ParamTraits<base::Time>::Log(const param_type& p, std::wstring* l) {
+ ParamTraits<int64>::Log(p.ToInternalValue(), l);
+}
+
void ParamTraits<DictionaryValue>::Write(Message* m, const param_type& p) {
WriteValue(m, &p, 0);
}

Powered by Google App Engine
This is Rietveld 408576698