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

Side by Side Diff: chrome/common/child_process_logging_win.cc

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/chrome_content_client.h » ('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 "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"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/metrics/variations/variations_util.h" 15 #include "chrome/common/metrics/variations/variations_util.h"
16 #include "chrome/installer/util/google_update_settings.h" 16 #include "chrome/installer/util/google_update_settings.h"
17 #include "content/public/common/gpu_info.h"
18 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "gpu/config/gpu_info.h"
19 19
20 namespace child_process_logging { 20 namespace child_process_logging {
21 21
22 namespace { 22 namespace {
23 23
24 // exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetActiveURL. 24 // exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetActiveURL.
25 typedef void (__cdecl *MainSetActiveURL)(const wchar_t*); 25 typedef void (__cdecl *MainSetActiveURL)(const wchar_t*);
26 26
27 // exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetClientId. 27 // exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetClientId.
28 typedef void (__cdecl *MainSetClientId)(const wchar_t*); 28 typedef void (__cdecl *MainSetClientId)(const wchar_t*);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 for (size_t i = 0; i < kMaxReportedActiveExtensions; ++i) { 150 for (size_t i = 0; i < kMaxReportedActiveExtensions; ++i) {
151 if (iter != extension_ids.end()) { 151 if (iter != extension_ids.end()) {
152 (set_extension_id)(i, ASCIIToWide(iter->c_str()).c_str()); 152 (set_extension_id)(i, ASCIIToWide(iter->c_str()).c_str());
153 ++iter; 153 ++iter;
154 } else { 154 } else {
155 (set_extension_id)(i, L""); 155 (set_extension_id)(i, L"");
156 } 156 }
157 } 157 }
158 } 158 }
159 159
160 void SetGpuInfo(const content::GPUInfo& gpu_info) { 160 void SetGpuInfo(const gpu::GPUInfo& gpu_info) {
161 static MainSetGpuInfo set_gpu_info = NULL; 161 static MainSetGpuInfo set_gpu_info = NULL;
162 // note: benign race condition on set_gpu_info. 162 // note: benign race condition on set_gpu_info.
163 if (!set_gpu_info) { 163 if (!set_gpu_info) {
164 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName); 164 HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
165 if (!exe_module) 165 if (!exe_module)
166 return; 166 return;
167 set_gpu_info = reinterpret_cast<MainSetGpuInfo>( 167 set_gpu_info = reinterpret_cast<MainSetGpuInfo>(
168 GetProcAddress(exe_module, "SetGpuInfo")); 168 GetProcAddress(exe_module, "SetGpuInfo"));
169 if (!set_gpu_info) 169 if (!set_gpu_info)
170 return; 170 return;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 return; 250 return;
251 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>( 251 set_number_of_views = reinterpret_cast<MainSetNumberOfViews>(
252 GetProcAddress(exe_module, "SetNumberOfViews")); 252 GetProcAddress(exe_module, "SetNumberOfViews"));
253 if (!set_number_of_views) 253 if (!set_number_of_views)
254 return; 254 return;
255 } 255 }
256 (set_number_of_views)(number_of_views); 256 (set_number_of_views)(number_of_views);
257 } 257 }
258 258
259 } // namespace child_process_logging 259 } // namespace child_process_logging
OLDNEW
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/chrome_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698