Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/drive_cache_metadata.cc |
| =================================================================== |
| --- chrome/browser/chromeos/gdata/drive_cache_metadata.cc (revision 158657) |
| +++ chrome/browser/chromeos/gdata/drive_cache_metadata.cc (working copy) |
| @@ -8,6 +8,7 @@ |
| #include "base/callback.h" |
| #include "base/file_util.h" |
| +#include "base/metrics/histogram.h" |
| #include "base/sequenced_task_runner.h" |
| #include "chrome/browser/chromeos/gdata/drive.pb.h" |
| #include "chrome/browser/chromeos/gdata/drive_file_system_util.h" |
| @@ -468,6 +469,7 @@ |
| // perhaps not other causes of failed DB::Open. |
| if (!db_status.ok()) { |
| DVLOG(1) << "Detected corrupt db"; |
| + UMA_HISTOGRAM_COUNTS("Drive.CorruptCacheDB", 1); |
|
satorux1
2012/09/25 22:40:50
I think we want to know success/failure ratio and
|
| const bool deleted = file_util::Delete(db_path, true); |
| DCHECK(deleted); |
| db_status = leveldb::DB::Open(options, db_path.value(), &level_db); |