Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/dom_actions.cc |
| diff --git a/chrome/browser/extensions/activity_log/dom_actions.cc b/chrome/browser/extensions/activity_log/dom_actions.cc |
| index ea2486cdb26cb04070c15b481e53cd49219c924d..15fff88d36138076202b632c08b3fe0c56ebb28d 100644 |
| --- a/chrome/browser/extensions/activity_log/dom_actions.cc |
| +++ b/chrome/browser/extensions/activity_log/dom_actions.cc |
| @@ -106,7 +106,7 @@ bool DOMAction::InitializeTable(sql::Connection* db) { |
| return initialized; |
| } |
| -void DOMAction::Record(sql::Connection* db) { |
| +bool DOMAction::Record(sql::Connection* db) { |
| std::string sql_str = "INSERT INTO " + std::string(kTableName) + |
| " (extension_id, time, url_action_type, url, url_title, api_call, args," |
| " extra) VALUES (?,?,?,?,?,?,?,?)"; |
| @@ -120,8 +120,12 @@ void DOMAction::Record(sql::Connection* db) { |
| statement.BindString(5, api_call_); |
| statement.BindString(6, args_); |
| statement.BindString(7, extra_); |
| - if (!statement.Run()) |
| + if (!statement.Run()) { |
| LOG(ERROR) << "Activity log database I/O failed: " << sql_str; |
| + statement.Clear(); |
|
Matt Perry
2013/06/07 20:58:01
The Statement destructor resets and frees its reso
|
| + return false; |
| + } |
| + return true; |
| } |
| std::string DOMAction::PrintForDebug() { |