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

Side by Side Diff: chrome/browser/extensions/activity_log.h

Issue 12491012: Improved extension activity logging for the chrome.webRequest API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Simplify code Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // This will create a DOMAction for storage in the database. 102 // This will create a DOMAction for storage in the database.
103 // The technical message might be the list of content scripts that have been 103 // The technical message might be the list of content scripts that have been
104 // injected, or the DOM API call; it's what's shown under "More". 104 // injected, or the DOM API call; it's what's shown under "More".
105 void LogDOMAction(const Extension* extension, 105 void LogDOMAction(const Extension* extension,
106 const GURL& url, // target URL 106 const GURL& url, // target URL
107 const string16& url_title, // title of the URL 107 const string16& url_title, // title of the URL
108 const std::string& api_call, // api call 108 const std::string& api_call, // api call
109 const ListValue* args, // arguments 109 const ListValue* args, // arguments
110 const std::string& extra); // extra logging info 110 const std::string& extra); // extra logging info
111 111
112 // Log a use of the WebRequest API to redirect, cancel, or modify page
113 // headers.
114 void LogWebRequestAction(const Extension* extension,
115 const GURL& url,
116 const std::string& api_call,
117 scoped_ptr<base::DictionaryValue> details,
118 const std::string& extra);
119
112 // Retrieves the list of actions for a given extension on a specific day. 120 // Retrieves the list of actions for a given extension on a specific day.
113 // Today is 0, yesterday is 1, etc. Returns one day at a time. 121 // Today is 0, yesterday is 1, etc. Returns one day at a time.
114 // Response is sent to the method/function in the callback. 122 // Response is sent to the method/function in the callback.
115 // Use base::Bind to create the callback. 123 // Use base::Bind to create the callback.
116 void GetActions(const std::string& extension_id, 124 void GetActions(const std::string& extension_id,
117 const int day, 125 const int day,
118 const base::Callback 126 const base::Callback
119 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& 127 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>&
120 callback); 128 callback);
121 129
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 241
234 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; 242 virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
235 243
236 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory); 244 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory);
237 }; 245 };
238 246
239 247
240 } // namespace extensions 248 } // namespace extensions
241 249
242 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ 250 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log.cc » ('j') | chrome/browser/extensions/api/web_request/web_request_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698