diff options
author | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 21:31:43 +0000 |
---|---|---|
committer | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 21:31:43 +0000 |
commit | 49051dc7a5259700401427f6658dfd784ff209ca (patch) | |
tree | 44eff77c5da8fde824ac355b845eb7de40f32d94 /webkit/fileapi | |
parent | 1c8cfe23cc8c7fbce1663e8fe5b481f17acb9e6b (diff) | |
download | chromium_src-49051dc7a5259700401427f6658dfd784ff209ca.zip chromium_src-49051dc7a5259700401427f6658dfd784ff209ca.tar.gz chromium_src-49051dc7a5259700401427f6658dfd784ff209ca.tar.bz2 |
Refine UMA stats for file system databases.
BUG=103018,116615
TEST=
Review URL: http://codereview.chromium.org/9956059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r-- | webkit/fileapi/file_system_directory_database.cc | 10 | ||||
-rw-r--r-- | webkit/fileapi/file_system_origin_database.cc | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_directory_database.cc b/webkit/fileapi/file_system_directory_database.cc index 6eb1df9..c25e006 100644 --- a/webkit/fileapi/file_system_directory_database.cc +++ b/webkit/fileapi/file_system_directory_database.cc @@ -74,6 +74,8 @@ const char kInitStatusHistogramLabel[] = "FileSystem.DirectoryDatabaseInit"; enum InitStatus { INIT_STATUS_OK = 0, INIT_STATUS_CORRUPTION, + INIT_STATUS_IO_ERROR, + INIT_STATUS_UNKNOWN_ERROR, INIT_STATUS_MAX }; @@ -444,9 +446,15 @@ void FileSystemDirectoryDatabase::ReportInitStatus( 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); } } diff --git a/webkit/fileapi/file_system_origin_database.cc b/webkit/fileapi/file_system_origin_database.cc index 279e4a0..d0a010f 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); } } |