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

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

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
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/activity_log/activity_log_policy.h
diff --git a/chrome/browser/extensions/activity_log/activity_log_policy.h b/chrome/browser/extensions/activity_log/activity_log_policy.h
index a677436d0bad1efc4705d5625d12140c53ba53d3..af20049ea3fade71ce999740b3a42a0557d92a98 100644
--- a/chrome/browser/extensions/activity_log/activity_log_policy.h
+++ b/chrome/browser/extensions/activity_log/activity_log_policy.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
#define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_LOG_POLICY_H_
+#include <map>
#include <set>
#include <string>
@@ -104,6 +105,10 @@ class ActivityLogPolicy {
// these methods more convenient from within a policy, but they are public.
class Util {
public:
+ // A collection of API calls, used to specify whitelists for argument
+ // filtering.
+ typedef std::set<std::pair<Action::ActionType, std::string> > ApiSet;
+
// Serialize a Value as a JSON string. Returns an empty string if value is
// null.
static std::string Serialize(const base::Value* value);
@@ -117,7 +122,7 @@ class ActivityLogPolicy {
// Strip arguments from most API actions, preserving actions only for a
// whitelisted set. Modifies the Action object in-place.
- static void StripArguments(const std::set<std::string>& api_whitelist,
+ static void StripArguments(const ApiSet& api_whitelist,
scoped_refptr<Action> action);
// Given a base day (timestamp at local midnight), computes the timestamp
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698