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

Unified Diff: chrome/browser/metrics/metrics_log_chromeos.h

Issue 146913005: Factor ChromeOS specific code out of MetricsLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address asvitkine's comments. 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
Index: chrome/browser/metrics/metrics_log_chromeos.h
diff --git a/chrome/browser/metrics/metrics_log_chromeos.h b/chrome/browser/metrics/metrics_log_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ccd7c1a60cf12c1c5165d81c1a61b24d3843274
--- /dev/null
+++ b/chrome/browser/metrics/metrics_log_chromeos.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_
+#define CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_
+
+#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/metrics/perf_provider_chromeos.h"
+#include "chrome/common/metrics/proto/chrome_user_metrics_extension.pb.h"
+#include "chrome/common/metrics/proto/system_profile.pb.h"
+#include "ui/events/event_utils.h"
+#include "ui/events/x/touch_factory_x11.h"
Alexei Svitkine (slow) 2014/01/30 18:17:54 Do you need all these includes in the header? For
tdresser 2014/01/30 19:32:30 Done.
+
+namespace device {
+class BluetoothAdapter;
+}
+
+// Performs ChromeOS specific metrics logging.
+class MetricsLogChromeOS {
+ public:
+ explicit MetricsLogChromeOS(metrics::SystemProfileProto* system_profile);
+ virtual ~MetricsLogChromeOS();
+
+ void LogChromeOSMetrics(
Alexei Svitkine (slow) 2014/01/30 18:17:54 Add a short comment about each of these methods.
tdresser 2014/01/30 19:32:30 Done.
+ metrics::SystemProfileProto* system_profile,
+ metrics::ChromeUserMetricsExtension* uma_proto);
+ void WriteRealtimeStabilityAttributes(
+ PrefService* pref,
+ metrics::SystemProfileProto::Stability* stability);
+
+ private:
+ // Update the number of users logged into a multi-profile session.
+ // If the number of users change while the log is open, the call invalidates
+ // the user count value.
+ void UpdateMultiProfileUserCount(
+ metrics::SystemProfileProto* system_profile);
+
+ void WriteExternalTouchscreensProto(
+ metrics::SystemProfileProto::Hardware* hardware);
+
+ // Sets the Bluetooth Adapter instance used for the WriteBluetoothProto()
+ // call.
+ void SetBluetoothAdapter(scoped_refptr<device::BluetoothAdapter> adapter);
+
+ // Writes info about paired Bluetooth devices on this system.
+ virtual void WriteBluetoothProto(
+ metrics::SystemProfileProto::Hardware* hardware);
+
+ metrics::PerfProvider perf_provider_;
+ // Bluetooth Adapter instance for collecting information about paired devices.
Alexei Svitkine (slow) 2014/01/30 18:17:54 Nit: Add an empty line before this comment.
tdresser 2014/01/30 19:32:30 Done.
+ scoped_refptr<device::BluetoothAdapter> adapter_;
+
+ DISALLOW_COPY_AND_ASSIGN(MetricsLogChromeOS);
+};
+
+#endif // CHROME_BROWSER_METRICS_METRICS_LOG_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698