| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 UNUSED_ACTION_API_BLOCKED = 2, // Not in use, but reserved for future. | 40 UNUSED_ACTION_API_BLOCKED = 2, // Not in use, but reserved for future. |
| 41 ACTION_CONTENT_SCRIPT = 3, | 41 ACTION_CONTENT_SCRIPT = 3, |
| 42 ACTION_DOM_ACCESS = 4, | 42 ACTION_DOM_ACCESS = 4, |
| 43 ACTION_DOM_EVENT = 5, | 43 ACTION_DOM_EVENT = 5, |
| 44 ACTION_WEB_REQUEST = 6, | 44 ACTION_WEB_REQUEST = 6, |
| 45 ACTION_ANY = 1001, // Used for lookups of unspecified type. | 45 ACTION_ANY = 1001, // Used for lookups of unspecified type. |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // The type of ad injection an action performed. | 48 // The type of ad injection an action performed. |
| 49 enum InjectionType { | 49 enum InjectionType { |
| 50 NO_AD_INJECTION = 0, // No ad injection occurred. | 50 // No ad injection occurred. |
| 51 INJECTION_NEW_AD, // A new ad was injected. | 51 NO_AD_INJECTION = 0, |
| 52 INJECTION_REMOVED_AD, // An ad was removed. | 52 // A new ad was injected. |
| 53 INJECTION_REPLACED_AD, // An ad was replaced. | 53 INJECTION_NEW_AD, |
| 54 NUM_INJECTION_TYPES // Place any new injection types above this entry. | 54 // An ad was removed. |
| 55 INJECTION_REMOVED_AD, |
| 56 // An ad was replaced. |
| 57 INJECTION_REPLACED_AD, |
| 58 // Something occurred which heuristically looks like an ad injection, but we |
| 59 // didn't categorize it as such (likely because we didn't recognize it as |
| 60 // an ad network). If our list is effective, this should be significantly |
| 61 // lower than the non-LIKELY counterparts. |
| 62 INJECTION_LIKELY_NEW_AD, |
| 63 INJECTION_LIKELY_REPLACED_AD, |
| 64 |
| 65 // Place any new injection types above this entry. |
| 66 NUM_INJECTION_TYPES |
| 55 }; | 67 }; |
| 56 | 68 |
| 57 // A useful shorthand for methods that take or return collections of Action | 69 // A useful shorthand for methods that take or return collections of Action |
| 58 // objects. | 70 // objects. |
| 59 typedef std::vector<scoped_refptr<Action> > ActionVector; | 71 typedef std::vector<scoped_refptr<Action> > ActionVector; |
| 60 | 72 |
| 61 // Creates a new activity log Action object. The extension_id and type | 73 // Creates a new activity log Action object. The extension_id and type |
| 62 // fields are immutable. All other fields can be filled in with the | 74 // fields are immutable. All other fields can be filled in with the |
| 63 // accessors/mutators below. | 75 // accessors/mutators below. |
| 64 Action(const std::string& extension_id, | 76 Action(const std::string& extension_id, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // comparisons. | 205 // comparisons. |
| 194 struct ActionComparatorExcludingTimeAndActionId { | 206 struct ActionComparatorExcludingTimeAndActionId { |
| 195 // Evaluates the comparison lhs < rhs. | 207 // Evaluates the comparison lhs < rhs. |
| 196 bool operator()(const scoped_refptr<Action>& lhs, | 208 bool operator()(const scoped_refptr<Action>& lhs, |
| 197 const scoped_refptr<Action>& rhs) const; | 209 const scoped_refptr<Action>& rhs) const; |
| 198 }; | 210 }; |
| 199 | 211 |
| 200 } // namespace extensions | 212 } // namespace extensions |
| 201 | 213 |
| 202 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ | 214 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ |
| OLD | NEW |