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

Unified Diff: components/history/core/browser/thumbnail_database.cc

Issue 1198373002: Split HistoryClient in two objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1192403002
Patch Set: Add comments in ChromeHistoryBackendClient Created 5 years, 6 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
Index: components/history/core/browser/thumbnail_database.cc
diff --git a/components/history/core/browser/thumbnail_database.cc b/components/history/core/browser/thumbnail_database.cc
index 2e699cee20dd12a24bdc307d967c73bc62713290..35afa12319fc9a021b6c7c3d7dfd30971e35cf5f 100644
--- a/components/history/core/browser/thumbnail_database.cc
+++ b/components/history/core/browser/thumbnail_database.cc
@@ -18,7 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
-#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/history_backend_client.h"
#include "components/history/core/browser/url_database.h"
#include "sql/recovery.h"
#include "sql/statement.h"
@@ -550,14 +550,14 @@ void RecoverDatabaseOrRaze(sql::Connection* db, const base::FilePath& db_path) {
void DatabaseErrorCallback(sql::Connection* db,
const base::FilePath& db_path,
size_t startup_kb,
- HistoryClient* history_client,
+ HistoryBackendClient* backend_client,
int extended_error,
sql::Statement* stmt) {
// TODO(shess): Assert that this is running on a safe thread.
// AFAICT, should be the history thread, but at this level I can't
// see how to reach that.
- if (history_client && history_client->ShouldReportDatabaseError()) {
+ if (backend_client && backend_client->ShouldReportDatabaseError()) {
GenerateDiagnostics(db, startup_kb, extended_error);
}
@@ -590,8 +590,8 @@ bool ThumbnailDatabase::IconMappingEnumerator::GetNextIconMapping(
return true;
}
-ThumbnailDatabase::ThumbnailDatabase(HistoryClient* history_client)
- : history_client_(history_client) {
+ThumbnailDatabase::ThumbnailDatabase(HistoryBackendClient* backend_client)
+ : backend_client_(backend_client) {
}
ThumbnailDatabase::~ThumbnailDatabase() {
@@ -1212,7 +1212,7 @@ sql::InitStatus ThumbnailDatabase::OpenDatabase(sql::Connection* db,
db->set_histogram_tag("Thumbnail");
db->set_error_callback(base::Bind(&DatabaseErrorCallback,
- db, db_name, startup_kb, history_client_));
+ db, db_name, startup_kb, backend_client_));
// Thumbnails db now only stores favicons, so we don't need that big a page
// size or cache.

Powered by Google App Engine
This is Rietveld 408576698