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

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: Declare dependency 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
« no previous file with comments | « chrome/browser/extensions/api/history/history_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e82cc0818437d6378a00cd109b99185b71d3c025 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,17 @@ 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(profile);
+ 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) {
« no previous file with comments | « chrome/browser/extensions/api/history/history_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698