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

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

Issue 23567022: [Activity log] Generalize the whitelist for keeping arguments (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase 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/extensions/activity_log/activity_log_policy.cc
diff --git a/chrome/browser/extensions/activity_log/activity_log_policy.cc b/chrome/browser/extensions/activity_log/activity_log_policy.cc
index 107b49e0a340d3d061907c9be16d45d35e0962e5..51827319925f3ce9c933120d1dbc2c5da9509a41 100644
--- a/chrome/browser/extensions/activity_log/activity_log_policy.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_policy.cc
@@ -123,16 +123,13 @@ void ActivityLogPolicy::Util::StripPrivacySensitiveFields(
}
// static
-void ActivityLogPolicy::Util::StripArguments(
- const std::set<std::string>& api_whitelist,
- scoped_refptr<Action> action) {
- if (action->action_type() != Action::ACTION_API_CALL &&
- action->action_type() != Action::ACTION_API_EVENT &&
- action->action_type() != Action::UNUSED_ACTION_API_BLOCKED)
- return;
-
- if (api_whitelist.find(action->api_name()) == api_whitelist.end())
+void ActivityLogPolicy::Util::StripArguments(const ApiSet& api_whitelist,
+ scoped_refptr<Action> action) {
+ if (api_whitelist.find(
+ std::make_pair(action->action_type(), action->api_name())) ==
+ api_whitelist.end()) {
action->set_args(scoped_ptr<ListValue>());
+ }
}
// static

Powered by Google App Engine
This is Rietveld 408576698