Commit 288da59e authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Migrate HistoryServiceObserver for Android and Mac

Change HistoryServiceObservers to use the new OnUrlsDeleted method.

Bug: 839798
Change-Id: I2aa458985077cb076c186a966a22843b3e41c61e
Reviewed-on: https://chromium-review.googlesource.com/1064410Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Reviewed-by: default avatarSidney San Martín <sdy@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560521}
parent 3ae94eab
......@@ -124,15 +124,12 @@ void DataObserver::OnURLsModified(history::HistoryService* history_service,
}
void DataObserver::OnURLsDeleted(history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) {
if (all_history) {
const history::DeletionInfo& deletion_info) {
if (deletion_info.IsAllHistory()) {
delta_file_service_->Clear();
data_cleared_callback_.Run();
} else {
for (const auto& row : deleted_rows) {
for (const auto& row : deletion_info.deleted_rows()) {
if (!row.hidden())
delta_file_service_->PageDeleted(row.url());
}
......
......@@ -75,10 +75,7 @@ class DataObserver : public bookmarks::BookmarkModelObserver,
void OnURLsModified(history::HistoryService* history_service,
const history::URLRows& changed_urls) override;
void OnURLsDeleted(history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) override;
const history::DeletionInfo& deletion_info) override;
private:
void DeleteBookmarks(const std::set<GURL>& removed_urls);
......
......@@ -1209,10 +1209,7 @@ void ChromeBrowserProvider::OnURLVisited(
void ChromeBrowserProvider::OnURLsDeleted(
history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) {
const history::DeletionInfo& deletion_info) {
OnHistoryChanged();
}
......
......@@ -202,10 +202,7 @@ class ChromeBrowserProvider : public bookmarks::BaseBookmarkModelObserver,
const history::RedirectList& redirects,
base::Time visit_time) override;
void OnURLsDeleted(history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) override;
const history::DeletionInfo& deletion_info) override;
void OnKeywordSearchTermUpdated(history::HistoryService* history_service,
const history::URLRow& row,
history::KeywordID keyword_id,
......
......@@ -214,10 +214,7 @@ class HistoryMenuBridge : public sessions::TabRestoreServiceObserver,
void OnURLsModified(history::HistoryService* history_service,
const history::URLRows& changed_urls) override;
void OnURLsDeleted(history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) override;
const history::DeletionInfo& deletion_info) override;
void OnHistoryServiceLoaded(history::HistoryService* service) override;
base::scoped_nsobject<HistoryMenuCocoaController> controller_; // strong
......
......@@ -454,11 +454,9 @@ void HistoryMenuBridge::OnURLsModified(history::HistoryService* history_service,
OnHistoryChanged();
}
void HistoryMenuBridge::OnURLsDeleted(history::HistoryService* history_service,
bool all_history,
bool expired,
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) {
void HistoryMenuBridge::OnURLsDeleted(
history::HistoryService* history_service,
const history::DeletionInfo& deletion_info) {
OnHistoryChanged();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment