| OLD | NEW |
| 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 "chrome/common/child_process_logging.h" | 5 #include "chrome/common/child_process_logging.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 for (int i = 0; | 82 for (int i = 0; |
| 83 i < kMaxReportedActiveExtensions && iter != extension_ids.end(); | 83 i < kMaxReportedActiveExtensions && iter != extension_ids.end(); |
| 84 ++i, ++iter) { | 84 ++i, ++iter) { |
| 85 extension_str += *iter; | 85 extension_str += *iter; |
| 86 } | 86 } |
| 87 strncpy(g_extension_ids, extension_str.c_str(), kMaxExtensionSize - 1); | 87 strncpy(g_extension_ids, extension_str.c_str(), kMaxExtensionSize - 1); |
| 88 g_extension_ids[kMaxExtensionSize - 1] = '\0'; | 88 g_extension_ids[kMaxExtensionSize - 1] = '\0'; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void SetGpuInfo(const content::GPUInfo& gpu_info) { | 91 void SetGpuInfo(const content::GPUInfo& gpu_info) { |
| 92 snprintf(g_gpu_vendor_id, kGpuStringSize, "0x%04x", gpu_info.vendor_id); | 92 snprintf(g_gpu_vendor_id, kGpuStringSize, "0x%04x", gpu_info.gpu.vendor_id); |
| 93 snprintf(g_gpu_device_id, kGpuStringSize, "0x%04x", gpu_info.device_id); | 93 snprintf(g_gpu_device_id, kGpuStringSize, "0x%04x", gpu_info.gpu.device_id); |
| 94 strncpy(g_gpu_driver_ver, | 94 strncpy(g_gpu_driver_ver, |
| 95 gpu_info.driver_version.c_str(), | 95 gpu_info.driver_version.c_str(), |
| 96 kGpuStringSize - 1); | 96 kGpuStringSize - 1); |
| 97 g_gpu_driver_ver[kGpuStringSize - 1] = '\0'; | 97 g_gpu_driver_ver[kGpuStringSize - 1] = '\0'; |
| 98 strncpy(g_gpu_ps_ver, | 98 strncpy(g_gpu_ps_ver, |
| 99 gpu_info.pixel_shader_version.c_str(), | 99 gpu_info.pixel_shader_version.c_str(), |
| 100 kGpuStringSize - 1); | 100 kGpuStringSize - 1); |
| 101 g_gpu_ps_ver[kGpuStringSize - 1] = '\0'; | 101 g_gpu_ps_ver[kGpuStringSize - 1] = '\0'; |
| 102 strncpy(g_gpu_vs_ver, | 102 strncpy(g_gpu_vs_ver, |
| 103 gpu_info.vertex_shader_version.c_str(), | 103 gpu_info.vertex_shader_version.c_str(), |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void SetExperimentList(const std::vector<string16>& state) { | 146 void SetExperimentList(const std::vector<string16>& state) { |
| 147 // TODO(mad): Implement this. | 147 // TODO(mad): Implement this. |
| 148 } | 148 } |
| 149 | 149 |
| 150 void SetChannel(const std::string& channel) { | 150 void SetChannel(const std::string& channel) { |
| 151 strncpy(g_channel, channel.c_str(), kChannelSize - 1); | 151 strncpy(g_channel, channel.c_str(), kChannelSize - 1); |
| 152 g_channel[kChannelSize - 1] = '\0'; | 152 g_channel[kChannelSize - 1] = '\0'; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace child_process_logging | 155 } // namespace child_process_logging |
| OLD | NEW |