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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 1424703003: Kills TraceTicks, which was functionally the same as TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed win compile error. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_message_utils.h" 5 #include "ipc/ipc_message_utils.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/nullable_string16.h" 10 #include "base/strings/nullable_string16.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 if (ret) 858 if (ret)
859 *r = base::TimeTicks::FromInternalValue(value); 859 *r = base::TimeTicks::FromInternalValue(value);
860 860
861 return ret; 861 return ret;
862 } 862 }
863 863
864 void ParamTraits<base::TimeTicks>::Log(const param_type& p, std::string* l) { 864 void ParamTraits<base::TimeTicks>::Log(const param_type& p, std::string* l) {
865 ParamTraits<int64_t>::Log(p.ToInternalValue(), l); 865 ParamTraits<int64_t>::Log(p.ToInternalValue(), l);
866 } 866 }
867 867
868 void ParamTraits<base::TraceTicks>::Write(Message* m, const param_type& p) {
869 ParamTraits<int64_t>::Write(m, p.ToInternalValue());
870 }
871
872 bool ParamTraits<base::TraceTicks>::Read(const Message* m,
873 base::PickleIterator* iter,
874 param_type* r) {
875 int64_t value;
876 bool ret = ParamTraits<int64_t>::Read(m, iter, &value);
877 if (ret)
878 *r = base::TraceTicks::FromInternalValue(value);
879
880 return ret;
881 }
882
883 void ParamTraits<base::TraceTicks>::Log(const param_type& p, std::string* l) {
884 ParamTraits<int64_t>::Log(p.ToInternalValue(), l);
885 }
886
887 void ParamTraits<IPC::ChannelHandle>::Write(Message* m, const param_type& p) { 868 void ParamTraits<IPC::ChannelHandle>::Write(Message* m, const param_type& p) {
888 #if defined(OS_WIN) 869 #if defined(OS_WIN)
889 // On Windows marshalling pipe handle is not supported. 870 // On Windows marshalling pipe handle is not supported.
890 DCHECK(p.pipe.handle == NULL); 871 DCHECK(p.pipe.handle == NULL);
891 #endif // defined (OS_WIN) 872 #endif // defined (OS_WIN)
892 WriteParam(m, p.name); 873 WriteParam(m, p.name);
893 #if defined(OS_POSIX) 874 #if defined(OS_POSIX)
894 WriteParam(m, p.socket); 875 WriteParam(m, p.socket);
895 #endif 876 #endif
896 } 877 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 return result; 1038 return result;
1058 } 1039 }
1059 1040
1060 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { 1041 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) {
1061 l->append("<MSG>"); 1042 l->append("<MSG>");
1062 } 1043 }
1063 1044
1064 #endif // OS_WIN 1045 #endif // OS_WIN
1065 1046
1066 } // namespace IPC 1047 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698