OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/media/webrtc_logging_handler_host.h" | 5 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/cpu.h" | 11 #include "base/cpu.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/sys_info.h" | 16 #include "base/sys_info.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "chrome/browser/bad_message.h" | 18 #include "chrome/browser/bad_message.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/chromeos/settings/cros_settings.h" | 20 #include "chrome/browser/chromeos/settings/cros_settings.h" |
21 #include "chrome/browser/media/webrtc_log_list.h" | 21 #include "chrome/browser/media/webrtc_log_list.h" |
22 #include "chrome/browser/media/webrtc_log_uploader.h" | 22 #include "chrome/browser/media/webrtc_log_uploader.h" |
23 #include "chrome/browser/media/webrtc_rtp_dump_handler.h" | 23 #include "chrome/browser/media/webrtc_rtp_dump_handler.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/common/channel_info.h" |
25 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/chrome_version_info.h" | |
27 #include "chrome/common/media/webrtc_logging_messages.h" | 27 #include "chrome/common/media/webrtc_logging_messages.h" |
28 #include "chromeos/settings/cros_settings_names.h" | 28 #include "chromeos/settings/cros_settings_names.h" |
| 29 #include "components/version_info/version_info.h" |
29 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/browser/content_browser_client.h" | 31 #include "content/public/browser/content_browser_client.h" |
31 #include "content/public/browser/gpu_data_manager.h" | 32 #include "content/public/browser/gpu_data_manager.h" |
32 #include "content/public/browser/render_process_host.h" | 33 #include "content/public/browser/render_process_host.h" |
33 #include "gpu/config/gpu_info.h" | 34 #include "gpu/config/gpu_info.h" |
34 #include "net/base/address_family.h" | 35 #include "net/base/address_family.h" |
35 #include "net/base/ip_address_number.h" | 36 #include "net/base/ip_address_number.h" |
36 #include "net/url_request/url_request_context_getter.h" | 37 #include "net/url_request/url_request_context_getter.h" |
37 | 38 |
38 #if defined(OS_LINUX) | 39 #if defined(OS_LINUX) |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 now.day_of_month, now.hour, now.minute, now.second)); | 567 now.day_of_month, now.hour, now.minute, now.second)); |
567 | 568 |
568 // Write metadata if received before logging started. | 569 // Write metadata if received before logging started. |
569 if (meta_data_.get() && !meta_data_->empty()) { | 570 if (meta_data_.get() && !meta_data_->empty()) { |
570 std::string info; | 571 std::string info; |
571 FormatMetaDataAsLogMessage(*meta_data_.get(), &info); | 572 FormatMetaDataAsLogMessage(*meta_data_.get(), &info); |
572 LogToCircularBuffer(info); | 573 LogToCircularBuffer(info); |
573 } | 574 } |
574 | 575 |
575 // Chrome version | 576 // Chrome version |
576 chrome::VersionInfo version_info; | 577 LogToCircularBuffer("Chrome version: " + version_info::GetVersionNumber() + |
577 LogToCircularBuffer("Chrome version: " + version_info.Version() + " " + | 578 " " + chrome::GetChannelString()); |
578 chrome::VersionInfo::GetVersionStringModifier()); | |
579 | 579 |
580 // OS | 580 // OS |
581 LogToCircularBuffer(base::SysInfo::OperatingSystemName() + " " + | 581 LogToCircularBuffer(base::SysInfo::OperatingSystemName() + " " + |
582 base::SysInfo::OperatingSystemVersion() + " " + | 582 base::SysInfo::OperatingSystemVersion() + " " + |
583 base::SysInfo::OperatingSystemArchitecture()); | 583 base::SysInfo::OperatingSystemArchitecture()); |
584 #if defined(OS_LINUX) | 584 #if defined(OS_LINUX) |
585 LogToCircularBuffer("Linux distribution: " + base::GetLinuxDistro()); | 585 LogToCircularBuffer("Linux distribution: " + base::GetLinuxDistro()); |
586 #endif | 586 #endif |
587 | 587 |
588 // CPU | 588 // CPU |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 WebRtcRtpDumpHandler::ReleasedDumps rtp_dumps( | 763 WebRtcRtpDumpHandler::ReleasedDumps rtp_dumps( |
764 rtp_dump_handler_->ReleaseDumps()); | 764 rtp_dump_handler_->ReleaseDumps()); |
765 log_paths->incoming_rtp_dump = rtp_dumps.incoming_dump_path; | 765 log_paths->incoming_rtp_dump = rtp_dumps.incoming_dump_path; |
766 log_paths->outgoing_rtp_dump = rtp_dumps.outgoing_dump_path; | 766 log_paths->outgoing_rtp_dump = rtp_dumps.outgoing_dump_path; |
767 | 767 |
768 rtp_dump_handler_.reset(); | 768 rtp_dump_handler_.reset(); |
769 stop_rtp_dump_callback_.Reset(); | 769 stop_rtp_dump_callback_.Reset(); |
770 | 770 |
771 return true; | 771 return true; |
772 } | 772 } |
OLD | NEW |