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

Unified Diff: ipc/ipc_message_utils.cc

Issue 7740070: Add metrics to measure time elapsed between form load and form submission with or without Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Once more, with feeling Created 9 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
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 6ef03f4328de9ed89da61728e1fd321adc15ceee..dcbde0bc0366dee7f6482f41354e1701351e4786 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -269,7 +269,7 @@ void ParamTraits<base::Time>::Log(const param_type& p, std::string* l) {
}
void ParamTraits<base::TimeDelta> ::Write(Message* m, const param_type& p) {
- ParamTraits<int64> ::Write(m, p.InMicroseconds());
+ ParamTraits<int64> ::Write(m, p.ToInternalValue());
}
bool ParamTraits<base::TimeDelta> ::Read(const Message* m,
@@ -278,13 +278,32 @@ bool ParamTraits<base::TimeDelta> ::Read(const Message* m,
int64 value;
bool ret = ParamTraits<int64> ::Read(m, iter, &value);
if (ret)
- *r = base::TimeDelta::FromMicroseconds(value);
+ *r = base::TimeDelta::FromInternalValue(value);
return ret;
}
void ParamTraits<base::TimeDelta> ::Log(const param_type& p, std::string* l) {
- ParamTraits<int64> ::Log(p.InMicroseconds(), l);
+ ParamTraits<int64> ::Log(p.ToInternalValue(), l);
+}
+
+void ParamTraits<base::TimeTicks> ::Write(Message* m, const param_type& p) {
+ ParamTraits<int64> ::Write(m, p.ToInternalValue());
+}
+
+bool ParamTraits<base::TimeTicks> ::Read(const Message* m,
+ void** iter,
+ param_type* r) {
+ int64 value;
+ bool ret = ParamTraits<int64> ::Read(m, iter, &value);
+ if (ret)
+ *r = base::TimeTicks::FromInternalValue(value);
+
+ return ret;
+}
+
+void ParamTraits<base::TimeTicks> ::Log(const param_type& p, std::string* l) {
+ ParamTraits<int64> ::Log(p.ToInternalValue(), l);
}
void ParamTraits<DictionaryValue>::Write(Message* m, const param_type& p) {
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698