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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_chromeos.cc

Issue 10933114: Combine boolean MediaDeviceNotifications histograms to an enumerated histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: chrome/browser/system_monitor/removable_device_notifications_chromeos.cc
diff --git a/chrome/browser/system_monitor/removable_device_notifications_chromeos.cc b/chrome/browser/system_monitor/removable_device_notifications_chromeos.cc
index 1b17b925cd5ac927a22b4c38c31401bcfae19d69..dbee675564c6f67e12eb90f29c5ef99be1f1e87b 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_chromeos.cc
+++ b/chrome/browser/system_monitor/removable_device_notifications_chromeos.cc
@@ -8,12 +8,12 @@
#include "base/file_path.h"
#include "base/logging.h"
-#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/system_monitor/media_device_notifications_utils.h"
#include "chrome/browser/system_monitor/media_storage_util.h"
+#include "chrome/browser/system_monitor/removable_device_notifications_histogram.h"
#include "content/public/browser/browser_thread.h"
namespace chromeos {
@@ -148,16 +148,15 @@ void RemovableDeviceNotificationsCros::AddMountedPathOnUIThread(
if (!GetDeviceInfo(mount_info.source_path, &unique_id, &device_label))
return;
- // Keep track of device uuid, to see how often we receive empty uuid values.
- UMA_HISTOGRAM_BOOLEAN("MediaDeviceNotification.DeviceUUIDAvailable",
- !unique_id.empty());
- if (unique_id.empty())
- return;
-
chrome::MediaStorageUtil::Type type = has_dcim ?
chrome::MediaStorageUtil::REMOVABLE_MASS_STORAGE_WITH_DCIM :
chrome::MediaStorageUtil::REMOVABLE_MASS_STORAGE_NO_DCIM;
+ // Keep track of device uuid, to see how often we receive empty uuid values.
vandebo (ex-Chrome) 2012/09/16 22:27:46 update comment.
kmadhusu 2012/09/17 18:29:07 Done.
+ RecordDeviceInfoHistogram(type, unique_id, device_label);
+ if (unique_id.empty() || device_label.empty())
+ return;
+
std::string device_id = chrome::MediaStorageUtil::MakeDeviceId(type,
unique_id);
mount_map_.insert(std::make_pair(mount_info.mount_path, device_id));

Powered by Google App Engine
This is Rietveld 408576698