| 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 | |
| 120 // Retrieves the list of actions for a given extension on a specific day. | 112 // Retrieves the list of actions for a given extension on a specific day. |
| 121 // Today is 0, yesterday is 1, etc. Returns one day at a time. | 113 // Today is 0, yesterday is 1, etc. Returns one day at a time. |
| 122 // Response is sent to the method/function in the callback. | 114 // Response is sent to the method/function in the callback. |
| 123 // Use base::Bind to create the callback. | 115 // Use base::Bind to create the callback. |
| 124 void GetActions(const std::string& extension_id, | 116 void GetActions(const std::string& extension_id, |
| 125 const int day, | 117 const int day, |
| 126 const base::Callback | 118 const base::Callback |
| 127 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& | 119 <void(scoped_ptr<std::vector<scoped_refptr<Action> > >)>& |
| 128 callback); | 120 callback); |
| 129 | 121 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 233 |
| 242 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; | 234 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; |
| 243 | 235 |
| 244 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory); | 236 DISALLOW_COPY_AND_ASSIGN(ActivityLogFactory); |
| 245 }; | 237 }; |
| 246 | 238 |
| 247 | 239 |
| 248 } // namespace extensions | 240 } // namespace extensions |
| 249 | 241 |
| 250 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ | 242 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_H_ |
| OLD | NEW |