| Index: chrome/browser/metrics/drive_metrics_provider.cc
|
| diff --git a/chrome/browser/metrics/drive_metrics_provider.cc b/chrome/browser/metrics/drive_metrics_provider.cc
|
| index f2e2ac51cdcae22e8985d81d93fcb14ed2f6759d..50c6270e6f4bb1fc2f9c420f18b631cf82bc1829 100644
|
| --- a/chrome/browser/metrics/drive_metrics_provider.cc
|
| +++ b/chrome/browser/metrics/drive_metrics_provider.cc
|
| @@ -9,8 +9,10 @@
|
| #include "base/files/file_path.h"
|
| #include "base/location.h"
|
| #include "base/logging.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "base/path_service.h"
|
| #include "base/sys_info.h"
|
| +#include "base/time/time.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| @@ -60,8 +62,19 @@ void DriveMetricsProvider::QuerySeekPenalty(
|
| if (!PathService::Get(path_service_key, &path))
|
| return;
|
|
|
| + base::TimeTicks start = base::TimeTicks::Now();
|
| +
|
| response->success =
|
| base::SysInfo::HasSeekPenalty(path, &response->has_seek_penalty);
|
| +
|
| + UMA_HISTOGRAM_TIMES("Hardware.Drive.HasSeekPenalty_Time",
|
| + base::TimeTicks::Now() - start);
|
| + UMA_HISTOGRAM_BOOLEAN("Hardware.Drive.HasSeekPenalty_Success",
|
| + response->success);
|
| + if (response->success) {
|
| + UMA_HISTOGRAM_BOOLEAN("Hardware.Drive.HasSeekPenalty",
|
| + response->has_seek_penalty);
|
| + }
|
| }
|
|
|
| void DriveMetricsProvider::GotDriveMetrics(
|
|
|