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

Side by Side Diff: chrome/browser/extensions/api_actions.cc

Issue 12918020: Removing arguments from the activity log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/api_actions.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "chrome/browser/extensions/api_actions.h" 7 #include "chrome/browser/extensions/api_actions.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 using content::BrowserThread; 10 using content::BrowserThread;
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 const char* APIAction::kTableName = "activitylog_apis"; 14 const char* APIAction::kTableName = "activitylog_apis";
15 const char* APIAction::kTableContentFields[] = 15 const char* APIAction::kTableContentFields[] =
16 {"api_type", "api_action_type", "target_type", "api_call", "args", "extra"}; 16 {"api_type", "api_action_type", "target_type", "api_call", "args", "extra"};
17 17
18 // We should log the arguments to these API calls, even if argument logging is
19 // disabled by default.
20 const char* APIAction::kAlwaysLog[] =
21 {"extension.connect", "extension.sendMessage",
22 "tabs.executeScript", "tabs.insertCSS" };
23 const int APIAction::kSizeAlwaysLog = arraysize(kAlwaysLog);
24
18 APIAction::APIAction(const std::string& extension_id, 25 APIAction::APIAction(const std::string& extension_id,
19 const base::Time& time, 26 const base::Time& time,
20 const Type type, 27 const Type type,
21 const Verb verb, 28 const Verb verb,
22 const Target target, 29 const Target target,
23 const std::string& api_call, 30 const std::string& api_call,
24 const std::string& args, 31 const std::string& args,
25 const std::string& extra) 32 const std::string& extra)
26 : Action(extension_id, time), 33 : Action(extension_id, time),
27 type_(type), 34 type_(type),
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } else if (str == "NOTIFICATION" || str == "notification") { 191 } else if (str == "NOTIFICATION" || str == "notification") {
185 return NOTIFICATION; 192 return NOTIFICATION;
186 } else if (str == "OMNIBOX" || str == "omnibox") { 193 } else if (str == "OMNIBOX" || str == "omnibox") {
187 return OMNIBOX; 194 return OMNIBOX;
188 } else { 195 } else {
189 return UNKNOWN_TARGET; 196 return UNKNOWN_TARGET;
190 } 197 }
191 } 198 }
192 199
193 } // namespace extensions 200 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api_actions.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698