| Index: components/history/core/browser/history_backend.h
|
| diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
|
| index 0b952b4b4b8ac365694ec5fb0558123917c14526..a934d600a639b88142947df1fe9dc10538007cee 100644
|
| --- a/components/history/core/browser/history_backend.h
|
| +++ b/components/history/core/browser/history_backend.h
|
| @@ -32,6 +32,7 @@
|
| #include "components/history/core/browser/keyword_id.h"
|
| #include "components/history/core/browser/thumbnail_database.h"
|
| #include "components/history/core/browser/visit_tracker.h"
|
| +#include "sql/db_diagnostic_map.h"
|
| #include "sql/init_status.h"
|
|
|
| class HistoryURLProvider;
|
| @@ -113,7 +114,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| virtual ~Delegate() {}
|
|
|
| // Called when the database cannot be read correctly for some reason.
|
| - virtual void NotifyProfileError(sql::InitStatus init_status) = 0;
|
| + virtual void NotifyProfileError(
|
| + sql::InitStatus init_status,
|
| + const sql::DatabaseDiagnosticMap& diagnostics) = 0;
|
|
|
| // Sets the in-memory history backend. The in-memory backend is created by
|
| // the main backend. For non-unit tests, this happens on the background
|
| @@ -824,6 +827,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| bool scheduled_kill_db_; // Database is being killed due to error.
|
| std::unique_ptr<ThumbnailDatabase> thumbnail_db_;
|
|
|
| + // Invoked when an error occurs on the database connection.
|
| + sql::Connection::ErrorCallback error_callback_;
|
| +
|
| // Manages expiration between the various databases.
|
| ExpireHistoryBackend expirer_;
|
|
|
| @@ -879,6 +885,10 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
|
| // Listens for the system being under memory pressure.
|
| std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
|
|
|
| + // Contains diagnostic information about the sql database that will be filled
|
| + // when a catastrophic error occurs.
|
| + sql::DatabaseDiagnosticMap db_diagnostics_;
|
| +
|
| // Map from host to index in the TopHosts list. It is updated only by
|
| // TopHosts(), so it's usually stale.
|
| mutable base::hash_map<std::string, int> host_ranks_;
|
|
|