| 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 <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 if (!set_gpu_info) { | 148 if (!set_gpu_info) { |
| 149 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); | 149 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); |
| 150 if (!exe_module) | 150 if (!exe_module) |
| 151 return; | 151 return; |
| 152 set_gpu_info = reinterpret_cast<MainSetGpuInfo>( | 152 set_gpu_info = reinterpret_cast<MainSetGpuInfo>( |
| 153 GetProcAddress(exe_module, "SetGpuInfo")); | 153 GetProcAddress(exe_module, "SetGpuInfo")); |
| 154 if (!set_gpu_info) | 154 if (!set_gpu_info) |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 (set_gpu_info)( | 157 (set_gpu_info)( |
| 158 base::StringPrintf(L"0x%04x", gpu_info.vendor_id).c_str(), | 158 base::StringPrintf(L"0x%04x", gpu_info.gpu.vendor_id).c_str(), |
| 159 base::StringPrintf(L"0x%04x", gpu_info.device_id).c_str(), | 159 base::StringPrintf(L"0x%04x", gpu_info.gpu.device_id).c_str(), |
| 160 UTF8ToUTF16(gpu_info.driver_version).c_str(), | 160 UTF8ToUTF16(gpu_info.driver_version).c_str(), |
| 161 UTF8ToUTF16(gpu_info.pixel_shader_version).c_str(), | 161 UTF8ToUTF16(gpu_info.pixel_shader_version).c_str(), |
| 162 UTF8ToUTF16(gpu_info.vertex_shader_version).c_str()); | 162 UTF8ToUTF16(gpu_info.vertex_shader_version).c_str()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void SetPrinterInfo(const char* printer_info) { | 165 void SetPrinterInfo(const char* printer_info) { |
| 166 static MainSetPrinterInfo set_printer_info = NULL; | 166 static MainSetPrinterInfo set_printer_info = NULL; |
| 167 // note: benign race condition on set_printer_info. | 167 // note: benign race condition on set_printer_info. |
| 168 if (!set_printer_info) { | 168 if (!set_printer_info) { |
| 169 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); | 169 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 return; | 216 return; |
| 217 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>( | 217 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>( |
| 218 GetProcAddress(exe_module, "SetNumberOfViews")); | 218 GetProcAddress(exe_module, "SetNumberOfViews")); |
| 219 if (!set_number_of_views) | 219 if (!set_number_of_views) |
| 220 return; | 220 return; |
| 221 } | 221 } |
| 222 (set_number_of_views)(number_of_views); | 222 (set_number_of_views)(number_of_views); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace child_process_logging | 225 } // namespace child_process_logging |
| OLD | NEW |