Parse and histogram LevelDB corruption errors.
commitf394b44314dc3177174bca62a018d5a2f6426a10
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 3 Jul 2013 05:55:36 +0000 (3 05:55 +0000)
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 3 Jul 2013 05:55:36 +0000 (3 05:55 +0000)
treeb263b8687bcef8291fc3364e306abca9570f2ffd
parentf8687bea8f2ea4d18e8075d712de1e167397b66b
Parse and histogram LevelDB corruption errors.

When LevelDB returns a corruption error, no error code is
included, just a descriptive string. This CL parses that
string for key phrases in order to determine the type of
corruption that was found.

Manually tested by
(1) open an IndexedDB
(2) close the browser
(3) echo -n "no new line" > http_localhost_0.indexeddb.leveldb/CURRENT
(4) reopen the IndexedDB
(5) check chrome://histograms/LevelDBOpenErrors.Corruption for the value 13

BUG=225051

Review URL: https://chromiumcodereview.appspot.com/18243003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209904 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/indexed_db/leveldb/leveldb_database.cc
tools/metrics/histograms/histograms.xml