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

Unified Diff: components/webdata/common/web_database_backend.h

Issue 2107493002: Offer user to send feedback from profile error dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting's & droger's Created 4 years, 4 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 | « components/webdata/common/web_database.cc ('k') | components/webdata/common/web_database_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webdata/common/web_database_backend.h
diff --git a/components/webdata/common/web_database_backend.h b/components/webdata/common/web_database_backend.h
index 341bb76d7ac5a095943fcd281970fc7316083309..a3ae1fc8a1d3a9429f06629782adc5b1f7cf521d 100644
--- a/components/webdata/common/web_database_backend.h
+++ b/components/webdata/common/web_database_backend.h
@@ -39,7 +39,11 @@ class WEBDATA_EXPORT WebDatabaseBackend
virtual ~Delegate() {}
// Invoked when the backend has finished loading the db.
- virtual void DBLoaded(sql::InitStatus status) = 0;
+ // |status| is the result of initializing the db.
+ // |diagnostics| contains diagnostic information about the db, and it will
+ // only be populated when an error occurs.
+ virtual void DBLoaded(sql::InitStatus status,
+ const std::string& diagnostics) = 0;
};
WebDatabaseBackend(
@@ -90,6 +94,9 @@ class WEBDATA_EXPORT WebDatabaseBackend
virtual ~WebDatabaseBackend();
private:
+ // Invoked on a db error.
+ void DatabaseErrorCallback(int error, sql::Statement* statement);
+
// Commit the current transaction.
void Commit();
@@ -119,6 +126,14 @@ class WEBDATA_EXPORT WebDatabaseBackend
// fails), used to avoid continually trying to reinit if the db init fails.
bool init_complete_;
+ // True if a catastrophic database error occurs and further error callbacks
+ // from the database should be ignored.
+ bool catastrophic_error_occurred_;
+
+ // If a catastrophic database error has occurred, this contains any available
+ // diagnostic information.
+ std::string diagnostics_;
+
// Delegate. See the class definition above for more information.
std::unique_ptr<Delegate> delegate_;
« no previous file with comments | « components/webdata/common/web_database.cc ('k') | components/webdata/common/web_database_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698