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

Unified Diff: chrome/browser/metrics/metrics_log.cc

Issue 103893005: Include external touchscreen vid/pid in UMA hardware profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback, and fix a comment with vid/pid flipped. Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/common/metrics/proto/system_profile.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_log.cc
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index cc231453429d609070f972753845b4f4e97a7be5..14189c789a5b0c1b3a5927ebdd43f5f71fe2497c 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -50,6 +50,7 @@
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/bluetooth_device.h"
#include "gpu/config/gpu_info.h"
+#include "ui/events/event_utils.h"
#include "ui/gfx/screen.h"
#include "url/gurl.h"
@@ -66,6 +67,7 @@ extern "C" IMAGE_DOS_HEADER __ImageBase;
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "ui/events/x/touch_factory_x11.h"
#endif
using content::GpuDataManager;
@@ -380,6 +382,19 @@ PairedDevice::Type AsBluetoothDeviceType(
NOTREACHED();
return PairedDevice::DEVICE_UNKNOWN;
}
+
+void WriteExternalTouchscreensProto(SystemProfileProto::Hardware* hardware) {
+ std::set<std::pair<int, int> > touchscreen_ids =
+ ui::TouchFactory::GetInstance()->GetTouchscreenIds();
+ for (std::set<std::pair<int, int> >::iterator it = touchscreen_ids.begin();
+ it != touchscreen_ids.end();
+ ++it) {
+ SystemProfileProto::Hardware::TouchScreen* touchscreen =
+ hardware->add_external_touchscreen();
+ touchscreen->set_vendor_id(it->first);
+ touchscreen->set_product_id(it->second);
+ }
+}
#endif // defined(OS_CHROMEOS)
// Round a timestamp measured in seconds since epoch to one with a granularity
@@ -801,6 +816,9 @@ void MetricsLog::RecordEnvironment(
uma_proto()->add_perf_data()->Swap(&perf_data_proto);
WriteBluetoothProto(hardware);
+ hardware->set_internal_display_supports_touch(
+ ui::InternalDisplaySupportsTouch());
+ WriteExternalTouchscreensProto(hardware);
UpdateMultiProfileUserCount();
#endif
« no previous file with comments | « no previous file | chrome/common/metrics/proto/system_profile.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698