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

Unified Diff: webkit/fileapi/file_system_origin_database.cc

Issue 9956059: Refine UMA stats for file system databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « webkit/fileapi/file_system_directory_database.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_origin_database.cc
diff --git a/webkit/fileapi/file_system_origin_database.cc b/webkit/fileapi/file_system_origin_database.cc
index 279e4a0744d05d665e1d3d8b28dea4ce73895709..d0a010f00f86c0d30d01811ce60aba6ccbc940fe 100644
--- a/webkit/fileapi/file_system_origin_database.cc
+++ b/webkit/fileapi/file_system_origin_database.cc
@@ -27,6 +27,8 @@ const char kInitStatusHistogramLabel[] = "FileSystem.OriginDatabaseInit";
enum InitStatus {
INIT_STATUS_OK = 0,
INIT_STATUS_CORRUPTION,
+ INIT_STATUS_IO_ERROR,
+ INIT_STATUS_UNKNOWN_ERROR,
INIT_STATUS_MAX
};
@@ -178,9 +180,15 @@ void FileSystemOriginDatabase::ReportInitStatus(const leveldb::Status& status) {
if (status.ok()) {
UMA_HISTOGRAM_ENUMERATION(kInitStatusHistogramLabel,
INIT_STATUS_OK, INIT_STATUS_MAX);
- } else {
+ } else if (status.IsCorruption()) {
UMA_HISTOGRAM_ENUMERATION(kInitStatusHistogramLabel,
INIT_STATUS_CORRUPTION, INIT_STATUS_MAX);
+ } else if (status.IsIOError()) {
+ UMA_HISTOGRAM_ENUMERATION(kInitStatusHistogramLabel,
+ INIT_STATUS_IO_ERROR, INIT_STATUS_MAX);
+ } else {
+ UMA_HISTOGRAM_ENUMERATION(kInitStatusHistogramLabel,
+ INIT_STATUS_UNKNOWN_ERROR, INIT_STATUS_MAX);
}
}
« no previous file with comments | « webkit/fileapi/file_system_directory_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698