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

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

Issue 12664009: Revert 189134 "Due to privacy concerns about the data contained ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 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: trunk/src/chrome/browser/extensions/activity_log.cc
===================================================================
--- trunk/src/chrome/browser/extensions/activity_log.cc (revision 189153)
+++ trunk/src/chrome/browser/extensions/activity_log.cc (working copy)
@@ -148,17 +148,6 @@
log_activity_to_ui_ = CommandLine::ForCurrentProcess()->
HasSwitch(switches::kEnableExtensionActivityUI);
- // enable-extension-activity-log-testing
- // Currently, this just controls whether arguments are collected. In the
- // future, it may also control other optional activity log features.
- log_arguments_ = CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kEnableExtensionActivityLogTesting);
- if (!log_arguments_) {
- for (int i = 0; i < APIAction::kSizeAlwaysLog; i++) {
- arg_whitelist_api_.insert(std::string(APIAction::kAlwaysLog[i]));
- }
- }
-
// If the database cannot be initialized for some reason, we keep
// chugging along but nothing will get recorded. If the UI is
// available, things will still get sent to the UI even if nothing
@@ -244,13 +233,7 @@
const ListValue* args,
const std::string& extra) {
if (!IsLogEnabled()) return;
- bool log_args = log_arguments_ ||
- arg_whitelist_api_.find(api_call) != arg_whitelist_api_.end();
- LogAPIActionInternal(extension,
- api_call,
- log_args ? args : new ListValue(),
- extra,
- APIAction::CALL);
+ LogAPIActionInternal(extension, api_call, args, extra, APIAction::CALL);
}
// A wrapper around LogAPIActionInternal, but we know it's actually an event
@@ -264,7 +247,7 @@
if (!IsLogEnabled()) return;
LogAPIActionInternal(extension,
api_call,
- log_arguments_ ? args : new ListValue(),
+ args,
extra,
APIAction::EVENT_CALLBACK);
}
@@ -275,22 +258,17 @@
const char* reason,
const std::string& extra) {
if (!IsLogEnabled()) return;
- bool log_args = log_arguments_ ||
- arg_whitelist_api_.find(blocked_call) != arg_whitelist_api_.end();
- std::string altered_args =
- log_args ? MakeArgList(args) : MakeArgList(new ListValue());
scoped_refptr<BlockedAction> action = new BlockedAction(extension->id(),
base::Time::Now(),
blocked_call,
- altered_args,
+ MakeArgList(args),
std::string(reason),
extra);
ScheduleAndForget(&ActivityDatabase::RecordAction, action);
// Display the action.
ObserverMap::const_iterator iter = observers_.find(extension);
if (iter != observers_.end()) {
- std::string blocked_str = MakeCallSignature(blocked_call,
- log_args ? args : new ListValue());
+ std::string blocked_str = MakeCallSignature(blocked_call, args);
iter->second->Notify(&Observer::OnExtensionActivity,
extension,
ActivityLog::ACTIVITY_EXTENSION_API_BLOCK,
Property changes on: trunk/src/chrome/browser/extensions/activity_log.cc
___________________________________________________________________
Deleted: svn:mergeinfo
« no previous file with comments | « trunk/src/chrome/browser/extensions/activity_log.h ('k') | trunk/src/chrome/browser/extensions/activity_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698