summaryrefslogtreecommitdiffstats
path: root/chrome/browser/diagnostics
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-27 00:07:44 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-27 00:07:44 +0000
commita20249847691aa026b3fe0be2629a8eb990df6c0 (patch)
treeca7fb92a2788e26e3e7e86e86b3b96726d8877fe /chrome/browser/diagnostics
parent5016ee1b96bfb7f32a4fd115866d51c33936a52f (diff)
downloadchromium_src-a20249847691aa026b3fe0be2629a8eb990df6c0.zip
chromium_src-a20249847691aa026b3fe0be2629a8eb990df6c0.tar.gz
chromium_src-a20249847691aa026b3fe0be2629a8eb990df6c0.tar.bz2
Raze history database if corrupted
BUG=151841 Test=Manual, see below. Repro steps: 1) Bookmark a few sites. Verify that the bookmarks in the bookmarks bar are showing their favicons. 2) Corrupt history database SQLite file in user profile manually 3) Run Chrome. Verify that the bookmarks in the bookmarks bar are missing their favicons. 4) Close Chrome and run again. Bookmarks should be back. Review URL: https://chromiumcodereview.appspot.com/11090078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/diagnostics')
-rw-r--r--chrome/browser/diagnostics/sqlite_diagnostics.cc11
-rw-r--r--chrome/browser/diagnostics/sqlite_diagnostics.h3
2 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc
index 6d51e7e..feb67d3 100644
--- a/chrome/browser/diagnostics/sqlite_diagnostics.cc
+++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc
@@ -95,7 +95,6 @@ class HistogramUniquifier {
public:
static const char* name() {
const char* kHistogramNames[] = {
- "Sqlite.History.Error",
"Sqlite.Thumbnail.Error",
"Sqlite.Text.Error",
"Sqlite.Web.Error"
@@ -106,20 +105,16 @@ class HistogramUniquifier {
} // namespace
-sql::ErrorDelegate* GetErrorHandlerForHistoryDb() {
- return new sql::DiagnosticErrorDelegate<HistogramUniquifier<0> >();
-}
-
sql::ErrorDelegate* GetErrorHandlerForThumbnailDb() {
- return new sql::DiagnosticErrorDelegate<HistogramUniquifier<1> >();
+ return new sql::DiagnosticErrorDelegate<HistogramUniquifier<0> >();
}
sql::ErrorDelegate* GetErrorHandlerForTextDb() {
- return new sql::DiagnosticErrorDelegate<HistogramUniquifier<2> >();
+ return new sql::DiagnosticErrorDelegate<HistogramUniquifier<1> >();
}
sql::ErrorDelegate* GetErrorHandlerForWebDb() {
- return new sql::DiagnosticErrorDelegate<HistogramUniquifier<3> >();
+ return new sql::DiagnosticErrorDelegate<HistogramUniquifier<2> >();
}
DiagnosticTest* MakeSqliteWebDbTest() {
diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.h b/chrome/browser/diagnostics/sqlite_diagnostics.h
index 2d03458..395f5ba 100644
--- a/chrome/browser/diagnostics/sqlite_diagnostics.h
+++ b/chrome/browser/diagnostics/sqlite_diagnostics.h
@@ -11,9 +11,8 @@ namespace sql {
class ErrorDelegate;
}
-// The following four factories create the error handlers that we use when
+// The following three factories create the error handlers that we use when
// issuing sqlite commands during normal browser operation.
-sql::ErrorDelegate* GetErrorHandlerForHistoryDb();
sql::ErrorDelegate* GetErrorHandlerForThumbnailDb();
sql::ErrorDelegate* GetErrorHandlerForTextDb();
sql::ErrorDelegate* GetErrorHandlerForWebDb();