OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/media/webrtc_internals.h" | 5 #include "content/browser/media/webrtc_internals.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "content/browser/media/webrtc_internals_ui_observer.h" | 9 #include "content/browser/media/webrtc_internals_ui_observer.h" |
10 #include "content/browser/web_contents/web_contents_view.h" | 10 #include "content/browser/web_contents/web_contents_view.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 // Append the update to the end of the log. | 131 // Append the update to the end of the log. |
132 base::ListValue* log = EnsureLogList(record); | 132 base::ListValue* log = EnsureLogList(record); |
133 if (!log) | 133 if (!log) |
134 return; | 134 return; |
135 | 135 |
136 base::DictionaryValue* log_entry = new base::DictionaryValue(); | 136 base::DictionaryValue* log_entry = new base::DictionaryValue(); |
137 if (!log_entry) | 137 if (!log_entry) |
138 return; | 138 return; |
139 | 139 |
140 int64 milliseconds = (base::Time::Now() - base::Time()).InMilliseconds(); | 140 double epoch_time = base::Time::Now().ToJsTime(); |
141 string time = base::Int64ToString(milliseconds); | 141 string time = base::DoubleToString(epoch_time); |
142 log_entry->SetString("time", time); | 142 log_entry->SetString("time", time); |
143 log_entry->SetString("type", type); | 143 log_entry->SetString("type", type); |
144 log_entry->SetString("value", value); | 144 log_entry->SetString("value", value); |
145 log->Append(log_entry); | 145 log->Append(log_entry); |
146 | 146 |
147 if (observers_.might_have_observers()) { | 147 if (observers_.might_have_observers()) { |
148 base::DictionaryValue update; | 148 base::DictionaryValue update; |
149 update.SetInteger("pid", static_cast<int>(pid)); | 149 update.SetInteger("pid", static_cast<int>(pid)); |
150 update.SetInteger("lid", lid); | 150 update.SetInteger("lid", lid); |
151 update.MergeDictionary(log_entry); | 151 update.MergeDictionary(log_entry); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 aec_dump_enabled_ = true; | 351 aec_dump_enabled_ = true; |
352 for (RenderProcessHost::iterator i( | 352 for (RenderProcessHost::iterator i( |
353 content::RenderProcessHost::AllHostsIterator()); | 353 content::RenderProcessHost::AllHostsIterator()); |
354 !i.IsAtEnd(); i.Advance()) { | 354 !i.IsAtEnd(); i.Advance()) { |
355 i.GetCurrentValue()->EnableAecDump(aec_dump_file_path_); | 355 i.GetCurrentValue()->EnableAecDump(aec_dump_file_path_); |
356 } | 356 } |
357 } | 357 } |
358 #endif | 358 #endif |
359 | 359 |
360 } // namespace content | 360 } // namespace content |
OLD | NEW |