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

Unified Diff: chrome/browser/history/expire_history_backend.cc

Issue 10380015: Now mark delete notifications for archived URLs specially (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 8 years, 7 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: chrome/browser/history/expire_history_backend.cc
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index 9ccdd59acfd466cf7a09644f70a9a27f8efef7ce..9742b1abc35c04532e793953d2e00ad42da829eb 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -237,7 +237,7 @@ void ExpireHistoryBackend::DeleteURLs(const std::vector<GURL>& urls) {
if (text_db_)
text_db_->OptimizeChangedDatabases(dependencies.text_db_changes);
- BroadcastDeleteNotifications(&dependencies);
+ BroadcastDeleteNotifications(&dependencies, DELETION_USER_INITIATED);
}
void ExpireHistoryBackend::ExpireHistoryBetween(
@@ -283,7 +283,7 @@ void ExpireHistoryBackend::ExpireVisits(const VisitVector& visits) {
DeleteFaviconsIfPossible(dependencies.affected_favicons);
// An is_null begin time means that all history should be deleted.
- BroadcastDeleteNotifications(&dependencies);
+ BroadcastDeleteNotifications(&dependencies, DELETION_USER_INITIATED);
// Pick up any bits possibly left over.
ParanoidExpireHistory();
@@ -351,7 +351,7 @@ void ExpireHistoryBackend::DeleteFaviconsIfPossible(
}
void ExpireHistoryBackend::BroadcastDeleteNotifications(
- DeleteDependencies* dependencies) {
+ DeleteDependencies* dependencies, DeletionType type) {
if (!dependencies->deleted_urls.empty()) {
// Broadcast the URL deleted notification. Note that we also broadcast when
// we were requested to delete everything even if that was a NOP, since
@@ -359,6 +359,7 @@ void ExpireHistoryBackend::BroadcastDeleteNotifications(
// determine if they care whether anything was deleted).
URLsDeletedDetails* deleted_details = new URLsDeletedDetails;
deleted_details->all_history = false;
+ deleted_details->archived = (type == DELETION_ARCHIVED);
deleted_details->rows = dependencies->deleted_urls;
delegate_->BroadcastNotifications(
chrome::NOTIFICATION_HISTORY_URLS_DELETED, deleted_details);
@@ -665,7 +666,7 @@ bool ExpireHistoryBackend::ArchiveSomeOldHistory(
// in history views since they were subframes, but they will be in the visited
// link system, which needs to be updated now. This function is smart enough
// to not do anything if nothing was deleted.
- BroadcastDeleteNotifications(&deleted_dependencies);
+ BroadcastDeleteNotifications(&deleted_dependencies, DELETION_ARCHIVED);
return more_to_expire;
}
« no previous file with comments | « chrome/browser/history/expire_history_backend.h ('k') | chrome/browser/history/expire_history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698