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

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: Fix some comments Created 7 years, 5 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 7eac24f596c1e10fd2aff8f89cfc5872aae5b042..74cd8d43894c3bb1fc2df93222d542a78ee680ac 100644
--- a/chrome/browser/extensions/activity_log/activity_log.cc
+++ b/chrome/browser/extensions/activity_log/activity_log.cc
@@ -146,13 +146,12 @@ void ActivityLog::SetDefaultPolicy(ActivityLogPolicy::PolicyType policy_type) {
switch (policy_type) {
case ActivityLogPolicy::POLICY_FULLSTREAM:
policy_ = new FullStreamUIPolicy(profile_);
- break;
mvrable 2013/07/17 16:41:23 Deleting these lines looks like an accidental edit
karenlees 2013/08/08 23:36:37 Done.
case ActivityLogPolicy::POLICY_NOARGS:
policy_ = new StreamWithoutArgsUIPolicy(profile_);
- break;
default:
NOTREACHED();
}
+
policy_type_ = policy_type;
}
}
@@ -511,4 +510,33 @@ void ActivityLog::OnScriptsExecuted(
}
}
+void ActivityLog::RemoveURLs(const std::vector<GURL>& gurls) {
+ if (!IsLogEnabled()) {
+ DLOG(INFO) << "Log not enabled for this profile.";
+ return;
+ }
+ policy_->RemoveURLs(gurls);
+}
+
+void ActivityLog::RemoveURLs(const std::set<GURL>& gurls) {
+ if (!IsLogEnabled()) {
+ DLOG(INFO) << "Log not enabled for this profile.";
+ return;
+ }
+
+ std::vector<GURL> urls;
+ for (std::set<GURL>::iterator it = gurls.begin(); it != gurls.end(); ++it) {
+ urls.push_back(*it);
+ }
+ policy_->RemoveURLs(urls);
+}
+
+void ActivityLog::RemoveURL(const GURL& gurl) {
+ if (!IsLogEnabled()) {
+ DLOG(INFO) << "Log not enabled for this profile.";
+ return;
+ }
+ policy_->RemoveURL(gurl);
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698