| Index: chrome/browser/webdata/keyword_table.cc
|
| diff --git a/chrome/browser/webdata/keyword_table.cc b/chrome/browser/webdata/keyword_table.cc
|
| index c7e123e187c9ccbd2b4961d3ef5808b6bd6364fb..4059b6a90a000ebf0c4fb6178251abd7c90e55ca 100644
|
| --- a/chrome/browser/webdata/keyword_table.cc
|
| +++ b/chrome/browser/webdata/keyword_table.cc
|
| @@ -147,14 +147,10 @@ bool KeywordTable::AddKeyword(const TemplateURL& url) {
|
| "autogenerate_keyword, logo_id, created_by_policy, instant_url, "
|
| "last_modified, sync_guid, id) VALUES "
|
| "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"));
|
| - if (!s) {
|
| - NOTREACHED() << "Statement prepare failed";
|
| - return false;
|
| - }
|
| BindURLToStatement(url, &s);
|
| s.BindInt64(kUrlIdPosition, url.id());
|
| +
|
| if (!s.Run()) {
|
| - NOTREACHED();
|
| return false;
|
| }
|
| return UpdateBackupSignature();
|
| @@ -162,12 +158,10 @@ bool KeywordTable::AddKeyword(const TemplateURL& url) {
|
|
|
| bool KeywordTable::RemoveKeyword(TemplateURLID id) {
|
| DCHECK(id);
|
| - sql::Statement s(db_->GetUniqueStatement("DELETE FROM keywords WHERE id=?"));
|
| - if (!s) {
|
| - NOTREACHED() << "Statement prepare failed";
|
| - return false;
|
| - }
|
| + sql::Statement s(
|
| + db_->GetUniqueStatement("DELETE FROM keywords WHERE id = ?"));
|
| s.BindInt64(0, id);
|
| +
|
| return s.Run() && UpdateBackupSignature();
|
| }
|
|
|
| @@ -179,10 +173,7 @@ bool KeywordTable::GetKeywords(std::vector<TemplateURL*>* urls) {
|
| "suggest_url, prepopulate_id, autogenerate_keyword, logo_id, "
|
| "created_by_policy, instant_url, last_modified, sync_guid "
|
| "FROM keywords ORDER BY id ASC"));
|
| - if (!s) {
|
| - NOTREACHED() << "Statement prepare failed";
|
| - return false;
|
| - }
|
| +
|
| while (s.Step()) {
|
| TemplateURL* template_url = new TemplateURL();
|
| GetURLFromStatement(s, template_url);
|
| @@ -202,12 +193,9 @@ bool KeywordTable::UpdateKeyword(const TemplateURL& url) {
|
| "suggest_url=?, prepopulate_id=?, autogenerate_keyword=?, "
|
| "logo_id=?, created_by_policy=?, instant_url=?, last_modified=?, "
|
| "sync_guid=? WHERE id=?"));
|
| - if (!s) {
|
| - NOTREACHED() << "Statement prepare failed";
|
| - return false;
|
| - }
|
| BindURLToStatement(url, &s);
|
| s.BindInt64(kUrlIdPosition, url.id());
|
| +
|
| return s.Run() && UpdateBackupSignature();
|
| }
|
|
|
|
|