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

Unified Diff: chrome/browser/extensions/activity_log/activity_log.cc

Issue 18878009: Add functions to clean URLs from the activity log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert history file changes - will do them on a new CL Created 7 years, 4 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/extensions/activity_log/activity_log.cc
diff --git a/chrome/browser/extensions/activity_log/activity_log.cc b/chrome/browser/extensions/activity_log/activity_log.cc
index 1c2afc4ffef5c6e5790d3f2428c13053739545d5..cd309cd31239c1c2d1d4e21996350679758e46ed 100644
--- a/chrome/browser/extensions/activity_log/activity_log.cc
+++ b/chrome/browser/extensions/activity_log/activity_log.cc
@@ -427,4 +427,34 @@ void ActivityLog::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
+void ActivityLog::RemoveURLs(const std::vector<GURL>& restrict_urls) {
+ if (!IsLogEnabled()) {
felt 2013/08/27 19:59:03 I don't think the DLOG is needed -- I think just r
karenlees 2013/08/27 21:13:25 Done.
+ DLOG(INFO) << "Log not enabled for this profile.";
+ return;
+ }
+ policy_->RemoveURLs(restrict_urls);
+}
+
+void ActivityLog::RemoveURLs(const std::set<GURL>& restrict_urls) {
+ if (!IsLogEnabled()) {
+ DLOG(INFO) << "Log not enabled for this profile.";
+ return;
+ }
+
+ std::vector<GURL> urls;
+ for (std::set<GURL>::iterator it = restrict_urls.begin();
+ it != restrict_urls.end(); ++it) {
+ urls.push_back(*it);
+ }
+ policy_->RemoveURLs(urls);
+}
+
+void ActivityLog::RemoveURL(const GURL& url) {
+ if (url.is_empty())
+ return;
+ std::vector<GURL> urls;
+ urls.push_back(url);
+ RemoveURLs(urls);
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698