Index: chrome/browser/extensions/api/history/history_api.cc |
diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc |
index e387b4f417935db2918ece5a031a515c18ea3788..4c74878696595817ce397e7a3412764ae37f69ad 100644 |
--- a/chrome/browser/extensions/api/history/history_api.cc |
+++ b/chrome/browser/extensions/api/history/history_api.cc |
@@ -17,6 +17,7 @@ |
#include "base/time/time.h" |
#include "base/values.h" |
#include "chrome/browser/chrome_notification_types.h" |
+#include "chrome/browser/extensions/activity_log/activity_log.h" |
#include "chrome/browser/extensions/event_router.h" |
#include "chrome/browser/extensions/extension_system.h" |
#include "chrome/browser/history/history_service.h" |
@@ -36,6 +37,7 @@ namespace extensions { |
using api::experimental_history::MostVisitedItem; |
using api::history::HistoryItem; |
using api::history::VisitItem; |
+using extensions::ActivityLog; |
typedef std::vector<linked_ptr<api::history::HistoryItem> > |
HistoryItemList; |
@@ -444,6 +446,12 @@ bool HistoryDeleteUrlFunction::RunImpl() { |
Profile::EXPLICIT_ACCESS); |
hs->DeleteURL(url); |
+ // Also clean out from the activity log. |
felt
2013/09/03 23:03:46
the activity log api needed to declare its depende
|
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile_); |
+ if (activity_log) { |
+ activity_log->RemoveURL(url); |
+ } |
+ |
SendResponse(true); |
return true; |
} |
@@ -470,6 +478,12 @@ bool HistoryDeleteRangeFunction::RunAsyncImpl() { |
base::Unretained(this)), |
&task_tracker_); |
+ // Also clean from the activity log. |
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
+ if (activity_log) { |
+ activity_log->RemoveURLs(restrict_urls); |
+ } |
+ |
return true; |
} |
@@ -493,6 +507,11 @@ bool HistoryDeleteAllFunction::RunAsyncImpl() { |
base::Unretained(this)), |
&task_tracker_); |
+ // Also clean up from the activity log. |
+ ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
+ if (activity_log) { |
+ activity_log->RemoveURLs(restrict_urls); |
+ } |
return true; |
} |