| Index: chrome/browser/extensions/activity_log/api_actions.cc
|
| diff --git a/chrome/browser/extensions/activity_log/api_actions.cc b/chrome/browser/extensions/activity_log/api_actions.cc
|
| index 6a7cb654321469ab48fe33dc76e082a5c295b845..6004dd36ab4dd78b75956f3fe02c1b21fad181f5 100644
|
| --- a/chrome/browser/extensions/activity_log/api_actions.cc
|
| +++ b/chrome/browser/extensions/activity_log/api_actions.cc
|
| @@ -186,7 +186,7 @@ bool APIAction::InitializeTable(sql::Connection* db) {
|
| arraysize(kTableContentFields));
|
| }
|
|
|
| -void APIAction::Record(sql::Connection* db) {
|
| +bool APIAction::Record(sql::Connection* db) {
|
| std::string sql_str = "INSERT INTO " + std::string(kTableName)
|
| + " (extension_id, time, api_type, api_call, args, extra) VALUES"
|
| " (?,?,?,?,?,?)";
|
| @@ -198,8 +198,12 @@ void APIAction::Record(sql::Connection* db) {
|
| statement.BindString(3, APINameMap::GetInstance()->ApiToShortname(api_call_));
|
| statement.BindString(4, args_);
|
| statement.BindString(5, extra_);
|
| - if (!statement.Run())
|
| + if (!statement.Run()) {
|
| LOG(ERROR) << "Activity log database I/O failed: " << sql_str;
|
| + statement.Clear();
|
| + return false;
|
| + }
|
| + return true;
|
| }
|
|
|
| // static
|
|
|