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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // The time the record was generated (or some approximation). | 60 // The time the record was generated (or some approximation). |
61 const base::Time& time() const { return time_; } | 61 const base::Time& time() const { return time_; } |
62 void set_time(const base::Time& time) { time_ = time; } | 62 void set_time(const base::Time& time) { time_ = time; } |
63 | 63 |
64 // The ActionType distinguishes different classes of actions that can be | 64 // The ActionType distinguishes different classes of actions that can be |
65 // logged, and determines which other fields are expected to be filled in. | 65 // logged, and determines which other fields are expected to be filled in. |
66 ActionType action_type() const { return action_type_; } | 66 ActionType action_type() const { return action_type_; } |
67 | 67 |
68 // The specific API call used or accessed, for example "chrome.tabs.get". | 68 // The specific API call used or accessed, for example "chrome.tabs.get". |
69 const std::string& api_name() const { return api_name_; } | 69 const std::string& api_name() const { return api_name_; } |
70 void set_api_name(const std::string api_name) { api_name_ = api_name; } | 70 void set_api_name(const std::string& api_name) { api_name_ = api_name; } |
71 | 71 |
72 // Any applicable arguments. This might be null to indicate no data | 72 // Any applicable arguments. This might be null to indicate no data |
73 // available (a distinct condition from an empty argument list). | 73 // available (a distinct condition from an empty argument list). |
74 // mutable_args() returns a pointer to the list stored in the Action which | 74 // mutable_args() returns a pointer to the list stored in the Action which |
75 // can be modified in place; if the list was null an empty list is created | 75 // can be modified in place; if the list was null an empty list is created |
76 // first. | 76 // first. |
77 const base::ListValue* args() const { return args_.get(); } | 77 const base::ListValue* args() const { return args_.get(); } |
78 void set_args(scoped_ptr<base::ListValue> args); | 78 void set_args(scoped_ptr<base::ListValue> args); |
79 base::ListValue* mutable_args(); | 79 base::ListValue* mutable_args(); |
80 | 80 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // comparisons. | 162 // comparisons. |
163 struct ActionComparatorExcludingTimeAndActionId { | 163 struct ActionComparatorExcludingTimeAndActionId { |
164 // Evaluates the comparison lhs < rhs. | 164 // Evaluates the comparison lhs < rhs. |
165 bool operator()(const scoped_refptr<Action>& lhs, | 165 bool operator()(const scoped_refptr<Action>& lhs, |
166 const scoped_refptr<Action>& rhs) const; | 166 const scoped_refptr<Action>& rhs) const; |
167 }; | 167 }; |
168 | 168 |
169 } // namespace extensions | 169 } // namespace extensions |
170 | 170 |
171 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ | 171 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ |
OLD | NEW |