| Index: chrome/browser/webdata/web_data_service.cc
|
| diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
|
| index 35fed8837d0063dd7fa1040676494c8dd8ad4be9..f6a466e62de61b048361572f87bd44663142afb5 100644
|
| --- a/chrome/browser/webdata/web_data_service.cc
|
| +++ b/chrome/browser/webdata/web_data_service.cc
|
| @@ -260,8 +260,9 @@ void WebDataService::RemoveWebIntent(const WebIntentServiceData& service) {
|
| ScheduleTask(Bind(&WebDataService::RemoveWebIntentImpl, this, request));
|
| }
|
|
|
| -WebDataService::Handle WebDataService::GetWebIntents(const string16& action,
|
| - WebDataServiceConsumer* consumer) {
|
| +WebDataService::Handle WebDataService::GetWebIntents(
|
| + const string16& action,
|
| + WebDataServiceConsumer* consumer) {
|
| DCHECK(consumer);
|
| GenericRequest<string16>* request = new GenericRequest<string16>(
|
| this, GetNextRequestHandle(), consumer, action);
|
| @@ -270,6 +271,20 @@ WebDataService::Handle WebDataService::GetWebIntents(const string16& action,
|
| return request->GetHandle();
|
| }
|
|
|
| +WebDataService::Handle WebDataService::GetWebIntentsForURL(
|
| + const string16& action,
|
| + const string16& service_url,
|
| + WebDataServiceConsumer* consumer) {
|
| + DCHECK(consumer);
|
| + GenericRequest2<string16, string16>* request =
|
| + new GenericRequest2<string16, string16>(
|
| + this, GetNextRequestHandle(), consumer, action, service_url);
|
| + RegisterRequest(request);
|
| + ScheduleTask(Bind(&WebDataService::GetWebIntentsForURLImpl, this, request));
|
| + return request->GetHandle();
|
| +}
|
| +
|
| +
|
| WebDataService::Handle WebDataService::GetAllWebIntents(
|
| WebDataServiceConsumer* consumer) {
|
| DCHECK(consumer);
|
| @@ -849,6 +864,20 @@ void WebDataService::GetWebIntentsImpl(GenericRequest<string16>* request) {
|
| request->RequestComplete();
|
| }
|
|
|
| +void WebDataService::GetWebIntentsForURLImpl(
|
| + GenericRequest2<string16, string16>* request) {
|
| + InitializeDatabaseIfNecessary();
|
| + if (db_ && !request->IsCancelled(NULL)) {
|
| + std::vector<WebIntentServiceData> result;
|
| + db_->GetWebIntentsTable()->GetWebIntentsForURL(
|
| + request->arg1(), request->arg2(), &result);
|
| + request->SetResult(
|
| + new WDResult<std::vector<WebIntentServiceData> >(
|
| + WEB_INTENTS_RESULT, result));
|
| + }
|
| + request->RequestComplete();
|
| +}
|
| +
|
| void WebDataService::GetAllWebIntentsImpl(
|
| GenericRequest<std::string>* request) {
|
| InitializeDatabaseIfNecessary();
|
|
|