Chromium Code Reviews| Index: chrome/browser/webdata/web_intents_table.cc |
| diff --git a/chrome/browser/webdata/web_intents_table.cc b/chrome/browser/webdata/web_intents_table.cc |
| index df7ec284c044c75f3a16b41247d0ca2501ea9e15..825ffe435bacf01c28a7a9424111e03020ec4b81 100644 |
| --- a/chrome/browser/webdata/web_intents_table.cc |
| +++ b/chrome/browser/webdata/web_intents_table.cc |
| @@ -85,6 +85,24 @@ bool WebIntentsTable::GetWebIntents( |
| return ExtractIntents(&s, intents); |
| } |
| +bool WebIntentsTable::GetWebIntentsForURL( |
| + const string16& action, |
| + const string16& service_url, |
| + std::vector<WebIntentServiceData>* intents) { |
| + DCHECK(intents); |
| + sql::Statement s(db_->GetUniqueStatement( |
| + "SELECT service_url, action, type, title, disposition FROM web_intents " |
| + "WHERE action=? AND service_url=?")); |
| + if (!s) { |
| + NOTREACHED() << "Statement prepare failed"; |
| + return false; |
|
James Hawkins
2011/10/06 17:46:04
Don't handle NOTREACHEDs by returning false. Leave
Greg Billock
2011/10/06 20:21:00
In opt, NOTREACHED is just LOG(ERROR)
James Hawkins
2011/10/06 20:55:03
Correct. Chrome style is to not handle DCHECKs and
Greg Billock
2011/10/06 21:37:57
That's the thing; it isn't a strong assertion and
James Hawkins
2011/10/06 21:42:32
You're missing the point. I realize NOTREACHED its
Greg Billock
2011/10/06 22:13:12
I hear you, but see a lot of evidence that the opp
James Hawkins
2011/10/07 20:29:48
They aren't common at all, and the returns for all
Greg Billock
2011/10/07 23:00:48
To the contrary, everywhere in /webdata NOTREACHED
|
| + } |
| + |
| + s.BindString16(0, action); |
| + s.BindString16(1, service_url); |
| + return ExtractIntents(&s, intents); |
| +} |
| + |
| bool WebIntentsTable::GetAllWebIntents( |
| std::vector<WebIntentServiceData>* intents) { |
| DCHECK(intents); |