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

Unified Diff: components/metrics/gpu/gpu_metrics_provider.cc

Issue 523273003: Moves GPUMetricsProvider to //components/metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/metrics/gpu/gpu_metrics_provider.cc
diff --git a/chrome/browser/metrics/gpu_metrics_provider.cc b/components/metrics/gpu/gpu_metrics_provider.cc
similarity index 89%
rename from chrome/browser/metrics/gpu_metrics_provider.cc
rename to components/metrics/gpu/gpu_metrics_provider.cc
index 34b8a39837296367934b909ccfc7da6b8fe74c41..ba81e7bab6dea3dd4dea2d813452dd44a8077ec2 100644
--- a/chrome/browser/metrics/gpu_metrics_provider.cc
+++ b/components/metrics/gpu/gpu_metrics_provider.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/metrics/gpu_metrics_provider.h"
+#include "components/metrics/gpu/gpu_metrics_provider.h"
#include "components/metrics/proto/system_profile.pb.h"
#include "content/public/browser/gpu_data_manager.h"
#include "gpu/config/gpu_info.h"
#include "ui/gfx/screen.h"
+namespace metrics {
+
#if defined(OS_WIN)
#include <windows.h>
@@ -37,8 +39,7 @@ BOOL CALLBACK GetMonitorDPICallback(HMONITOR, HDC hdc, LPRECT, LPARAM dwData) {
return TRUE;
}
-void WriteScreenDPIInformationProto(
- metrics::SystemProfileProto::Hardware* hardware) {
+void WriteScreenDPIInformationProto(SystemProfileProto::Hardware* hardware) {
HDC desktop_dc = GetDC(NULL);
if (desktop_dc) {
ScreenDPIInformation si = {0, 0};
@@ -62,19 +63,19 @@ GPUMetricsProvider::~GPUMetricsProvider() {
}
void GPUMetricsProvider::ProvideSystemProfileMetrics(
- metrics::SystemProfileProto* system_profile_proto) {
- metrics::SystemProfileProto::Hardware* hardware =
+ SystemProfileProto* system_profile_proto) {
+ SystemProfileProto::Hardware* hardware =
system_profile_proto->mutable_hardware();
const gpu::GPUInfo& gpu_info =
content::GpuDataManager::GetInstance()->GetGPUInfo();
- metrics::SystemProfileProto::Hardware::Graphics* gpu =
+ SystemProfileProto::Hardware::Graphics* gpu =
hardware->mutable_gpu();
gpu->set_vendor_id(gpu_info.gpu.vendor_id);
gpu->set_device_id(gpu_info.gpu.device_id);
gpu->set_driver_version(gpu_info.driver_version);
gpu->set_driver_date(gpu_info.driver_date);
- metrics::SystemProfileProto::Hardware::Graphics::PerformanceStatistics*
+ SystemProfileProto::Hardware::Graphics::PerformanceStatistics*
gpu_performance = gpu->mutable_performance_statistics();
gpu_performance->set_graphics_score(gpu_info.performance_stats.graphics);
gpu_performance->set_gaming_score(gpu_info.performance_stats.gaming);
@@ -106,3 +107,5 @@ int GPUMetricsProvider::GetScreenCount() const {
// TODO(scottmg): NativeScreen maybe wrong. http://crbug.com/133312
return gfx::Screen::GetNativeScreen()->GetNumDisplays();
}
+
+} // namespace metrics
« no previous file with comments | « components/metrics/gpu/gpu_metrics_provider.h ('k') | components/metrics/gpu/gpu_metrics_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698