OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |