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

Side by Side Diff: content/browser/devtools/devtools_system_info_handler.cc

Issue 698783002: Revert of Revert of Add logs to debug a flakiness on GPU Mac bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
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 "content/browser/devtools/devtools_system_info_handler.h" 5 #include "content/browser/devtools/devtools_system_info_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/browser/devtools/devtools_protocol_constants.h" 10 #include "content/browser/devtools/devtools_protocol_constants.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 base::Bind(&DevToolsSystemInfoHandler::OnGetInfo, 94 base::Bind(&DevToolsSystemInfoHandler::OnGetInfo,
95 base::Unretained(this))); 95 base::Unretained(this)));
96 } 96 }
97 97
98 DevToolsSystemInfoHandler::~DevToolsSystemInfoHandler() { 98 DevToolsSystemInfoHandler::~DevToolsSystemInfoHandler() {
99 } 99 }
100 100
101 scoped_refptr<DevToolsProtocol::Response> 101 scoped_refptr<DevToolsProtocol::Response>
102 DevToolsSystemInfoHandler::OnGetInfo( 102 DevToolsSystemInfoHandler::OnGetInfo(
103 scoped_refptr<DevToolsProtocol::Command> command) { 103 scoped_refptr<DevToolsProtocol::Command> command) {
104 VLOG(2) << "DevToolsSystemInfoHandler::OnGetInfo() : BEGIN";
105
104 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); 106 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo();
105 base::DictionaryValue* gpu_dict = new base::DictionaryValue; 107 base::DictionaryValue* gpu_dict = new base::DictionaryValue;
106 108
107 base::ListValue* devices = new base::ListValue; 109 base::ListValue* devices = new base::ListValue;
108 devices->Append(GPUDeviceToDictionary(gpu_info.gpu)); 110 devices->Append(GPUDeviceToDictionary(gpu_info.gpu));
109 for (size_t ii = 0; ii < gpu_info.secondary_gpus.size(); ++ii) { 111 for (size_t ii = 0; ii < gpu_info.secondary_gpus.size(); ++ii) {
110 devices->Append(GPUDeviceToDictionary(gpu_info.secondary_gpus[ii])); 112 devices->Append(GPUDeviceToDictionary(gpu_info.secondary_gpus[ii]));
111 } 113 }
112 gpu_dict->Set(kDevices, devices); 114 gpu_dict->Set(kDevices, devices);
113 115
114 base::DictionaryValue* aux_attributes = new base::DictionaryValue; 116 base::DictionaryValue* aux_attributes = new base::DictionaryValue;
115 AuxGPUInfoEnumerator enumerator(aux_attributes); 117 AuxGPUInfoEnumerator enumerator(aux_attributes);
116 gpu_info.EnumerateFields(&enumerator); 118 gpu_info.EnumerateFields(&enumerator);
117 gpu_dict->Set(kAuxAttributes, aux_attributes); 119 gpu_dict->Set(kAuxAttributes, aux_attributes);
118 120
119 gpu_dict->Set(kFeatureStatus, GetFeatureStatus()); 121 gpu_dict->Set(kFeatureStatus, GetFeatureStatus());
120 122
121 gpu_dict->Set(kDriverBugWorkarounds, GetDriverBugWorkarounds()); 123 gpu_dict->Set(kDriverBugWorkarounds, GetDriverBugWorkarounds());
122 124
123 base::DictionaryValue* system_dict = new base::DictionaryValue; 125 base::DictionaryValue* system_dict = new base::DictionaryValue;
124 system_dict->SetString(kModelName, gpu_info.machine_model_name); 126 system_dict->SetString(kModelName, gpu_info.machine_model_name);
125 system_dict->SetString(kModelVersion, gpu_info.machine_model_version); 127 system_dict->SetString(kModelVersion, gpu_info.machine_model_version);
126 system_dict->Set(kGPU, gpu_dict); 128 system_dict->Set(kGPU, gpu_dict);
129
130 VLOG(2) << "DevToolsSystemInfoHandler::OnGetInfo() : END";
127 return command->SuccessResponse(system_dict); 131 return command->SuccessResponse(system_dict);
128 } 132 }
129 133
130 } // namespace content 134 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_http_handler_impl.cc ('k') | content/browser/gpu/gpu_data_manager_impl_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698