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

Unified Diff: chrome/browser/ui/webui/history_ui.cc

Issue 23785002: Clean up activity log URLs when history is cleaned. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix line Created 7 years, 3 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/ui/webui/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 2b1f49ec66f93001f461dcf577792c63c38aae26..ee4b149b64a73aecbedada9825bf141910ff3772 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/extensions/activity_log/activity_log.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/history_types.h"
@@ -617,6 +618,19 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const ListValue* args) {
base::Bind(&BrowsingHistoryHandler::RemoveWebHistoryComplete,
base::Unretained(this)));
}
+
+ // If the profile has activity logging enabled also clean up any URLs from
+ // the extension activity log. The extension activity log contains URLS
+ // which websites an extension has activity on so it will indirectly
+ // contain websites that a user has visited.
+ extensions::ActivityLog* activity_log = extensions::ActivityLog::GetInstance(
Bernhard Bauer 2013/09/03 21:55:42 Nit: This might look a bit nicer if you break afte
karenlees 2013/09/04 21:35:05 Done.
+ profile);
+ if (activity_log) {
+ for (std::vector<history::ExpireHistoryArgs>::const_iterator it =
+ expire_list.begin(); it != expire_list.end(); ++it) {
+ activity_log->RemoveURLs(it->urls);
+ }
+ }
}
void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698