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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 267573005: UMA stats for MTP file system in Chrome OS Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address the review comment. Created 6 years, 7 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 | « chrome/browser/chromeos/file_manager/volume_manager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/volume_manager.cc
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc
index 915ca1838499b985db296fdb6249fee5b4db89e7..9ed91b88a7e06f06178052d0c1f1b9840dfafaa9 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -11,6 +11,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
+#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
@@ -111,6 +112,8 @@ std::string VolumeTypeToString(VolumeType type) {
return "mtp";
case VOLUME_TYPE_TESTING:
return "testing";
+ case NUM_VOLUME_TYPE:
+ break;
}
NOTREACHED();
return "";
@@ -801,9 +804,16 @@ void VolumeManager::DoMountEvent(chromeos::MountError error_code,
return;
}
- if (error_code == chromeos::MOUNT_ERROR_NONE || volume_info.mount_condition)
+ if (error_code == chromeos::MOUNT_ERROR_NONE || volume_info.mount_condition) {
mounted_volumes_[volume_info.volume_id] = volume_info;
+ if (!is_remounting) {
+ UMA_HISTOGRAM_ENUMERATION("FileBrowser.VolumeType",
+ volume_info.type,
+ NUM_VOLUME_TYPE);
+ }
+ }
+
FOR_EACH_OBSERVER(VolumeManagerObserver,
observers_,
OnVolumeMounted(error_code, volume_info, is_remounting));
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698