| Index: chrome/browser/extensions/activity_log/blocked_actions.cc
|
| diff --git a/chrome/browser/extensions/activity_log/blocked_actions.cc b/chrome/browser/extensions/activity_log/blocked_actions.cc
|
| index aa35f70041c2832736723dbd9cc4530617a160bd..ec4ae446d5a8543c15172a51ad23d2bfbbcc57a2 100644
|
| --- a/chrome/browser/extensions/activity_log/blocked_actions.cc
|
| +++ b/chrome/browser/extensions/activity_log/blocked_actions.cc
|
| @@ -95,7 +95,7 @@ bool BlockedAction::InitializeTable(sql::Connection* db) {
|
| arraysize(kTableContentFields));
|
| }
|
|
|
| -void BlockedAction::Record(sql::Connection* db) {
|
| +bool BlockedAction::Record(sql::Connection* db) {
|
| std::string sql_str = "INSERT INTO " + std::string(kTableName)
|
| + " (extension_id, time, api_call, args, reason, extra)"
|
| " VALUES (?,?,?,?,?,?)";
|
| @@ -107,8 +107,13 @@ void BlockedAction::Record(sql::Connection* db) {
|
| statement.BindString(3, args_);
|
| statement.BindInt(4, static_cast<int>(reason_));
|
| statement.BindString(5, extra_);
|
| - if (!statement.Run())
|
| + if (!statement.Run()) {
|
| LOG(ERROR) << "Activity log database I/O failed: " << sql_str;
|
| + statement.Clear();
|
| + return false;
|
| + } else {
|
| + return true;
|
| + }
|
| }
|
|
|
| std::string BlockedAction::PrintForDebug() {
|
|
|