| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // A dictionary where any additional data can be stored. | 96 // A dictionary where any additional data can be stored. |
| 97 const DictionaryValue* other() const { return other_.get(); } | 97 const DictionaryValue* other() const { return other_.get(); } |
| 98 void set_other(scoped_ptr<DictionaryValue> other); | 98 void set_other(scoped_ptr<DictionaryValue> other); |
| 99 DictionaryValue* mutable_other(); | 99 DictionaryValue* mutable_other(); |
| 100 | 100 |
| 101 // Flatten the activity's type-specific fields into an ExtensionActivity. | 101 // Flatten the activity's type-specific fields into an ExtensionActivity. |
| 102 scoped_ptr<api::activity_log_private::ExtensionActivity> | 102 scoped_ptr<api::activity_log_private::ExtensionActivity> |
| 103 ConvertToExtensionActivity(); | 103 ConvertToExtensionActivity(); |
| 104 | 104 |
| 105 // Print an action as a regular string for debugging purposes. | 105 // Print an action as a regular string for debugging purposes. |
| 106 std::string PrintForDebug(); | 106 virtual std::string PrintForDebug() const; |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 virtual ~Action(); | 109 virtual ~Action(); |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 friend class base::RefCountedThreadSafe<Action>; | 112 friend class base::RefCountedThreadSafe<Action>; |
| 113 | 113 |
| 114 std::string extension_id_; | 114 std::string extension_id_; |
| 115 base::Time time_; | 115 base::Time time_; |
| 116 api::activity_log_private::ExtensionActivity::ActivityType activity_type_; | 116 api::activity_log_private::ExtensionActivity::ActivityType activity_type_; |
| 117 ActionType action_type_; | 117 ActionType action_type_; |
| 118 std::string api_name_; | 118 std::string api_name_; |
| 119 scoped_ptr<ListValue> args_; | 119 scoped_ptr<ListValue> args_; |
| 120 GURL page_url_; | 120 GURL page_url_; |
| 121 std::string page_title_; | 121 std::string page_title_; |
| 122 bool page_incognito_; | 122 bool page_incognito_; |
| 123 GURL arg_url_; | 123 GURL arg_url_; |
| 124 bool arg_incognito_; | 124 bool arg_incognito_; |
| 125 scoped_ptr<DictionaryValue> other_; | 125 scoped_ptr<DictionaryValue> other_; |
| 126 | 126 |
| 127 DISALLOW_COPY_AND_ASSIGN(Action); | 127 DISALLOW_COPY_AND_ASSIGN(Action); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace extensions | 130 } // namespace extensions |
| 131 | 131 |
| 132 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ | 132 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ |
| OLD | NEW |