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_BLOCKED_ACTIONS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_BLOCKED_ACTIONS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_BLOCKED_ACTIONS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_BLOCKED_ACTIONS_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/activity_log/activity_actions.h" | 8 #include "chrome/browser/extensions/activity_log/activity_actions.h" |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
(...skipping 23 matching lines...) Expand all Loading... |
34 const base::Time& time, | 34 const base::Time& time, |
35 const std::string& api_call, // the blocked API call | 35 const std::string& api_call, // the blocked API call |
36 const std::string& args, // the arguments | 36 const std::string& args, // the arguments |
37 const Reason reason, // the reason it's blocked | 37 const Reason reason, // the reason it's blocked |
38 const std::string& extra); // any extra logging info | 38 const std::string& extra); // any extra logging info |
39 | 39 |
40 // Create a new BlockedAction from a database row. | 40 // Create a new BlockedAction from a database row. |
41 explicit BlockedAction(const sql::Statement& s); | 41 explicit BlockedAction(const sql::Statement& s); |
42 | 42 |
43 // Record the action in the database. | 43 // Record the action in the database. |
44 virtual void Record(sql::Connection* db) OVERRIDE; | 44 virtual bool Record(sql::Connection* db) OVERRIDE; |
45 | 45 |
46 virtual scoped_ptr<api::activity_log_private::ExtensionActivity> | 46 virtual scoped_ptr<api::activity_log_private::ExtensionActivity> |
47 ConvertToExtensionActivity() OVERRIDE; | 47 ConvertToExtensionActivity() OVERRIDE; |
48 | 48 |
49 // Print a BlockedAction as a string for debugging purposes. | 49 // Print a BlockedAction as a string for debugging purposes. |
50 virtual std::string PrintForDebug() OVERRIDE; | 50 virtual std::string PrintForDebug() OVERRIDE; |
51 | 51 |
52 // Helper methods for recording the values into the db. | 52 // Helper methods for recording the values into the db. |
53 const std::string& api_call() const { return api_call_; } | 53 const std::string& api_call() const { return api_call_; } |
54 const std::string& args() const { return args_; } | 54 const std::string& args() const { return args_; } |
(...skipping 11 matching lines...) Expand all Loading... |
66 Reason reason_; | 66 Reason reason_; |
67 std::string extra_; | 67 std::string extra_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(BlockedAction); | 69 DISALLOW_COPY_AND_ASSIGN(BlockedAction); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace extensions | 72 } // namespace extensions |
73 | 73 |
74 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_BLOCKED_ACTIONS_H_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_BLOCKED_ACTIONS_H_ |
75 | 75 |
OLD | NEW |