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 8549a348f490f5d6ff3fb1c42bc7c254c9ed84d7..47339b2450f18c0402b184c0f16ed49cfbcb74f6 100644 |
--- a/chrome/browser/webdata/web_data_service.cc |
+++ b/chrome/browser/webdata/web_data_service.cc |
@@ -278,6 +278,20 @@ WebDataService::Handle WebDataService::GetWebIntentServices( |
return request->GetHandle(); |
} |
+WebDataService::Handle WebDataService::GetWebIntentServicesForURL( |
+ const string16& service_url, |
+ WebDataServiceConsumer* consumer) { |
+ DCHECK(consumer); |
+ GenericRequest<string16>* request = new GenericRequest<string16>( |
+ this, GetNextRequestHandle(), consumer, service_url); |
+ RegisterRequest(request); |
+ ScheduleTask(Bind(&WebDataService::GetWebIntentServicesForURLImpl, |
+ this, |
+ request)); |
+ return request->GetHandle(); |
+} |
+ |
+ |
WebDataService::Handle WebDataService::GetAllWebIntentServices( |
WebDataServiceConsumer* consumer) { |
DCHECK(consumer); |
@@ -891,6 +905,20 @@ void WebDataService::GetWebIntentServicesImpl( |
request->RequestComplete(); |
} |
+void WebDataService::GetWebIntentServicesForURLImpl( |
+ GenericRequest<string16>* request) { |
+ InitializeDatabaseIfNecessary(); |
+ if (db_ && !request->IsCancelled(NULL)) { |
+ std::vector<WebIntentServiceData> result; |
+ db_->GetWebIntentsTable()->GetWebIntentServicesForURL( |
+ request->arg(), &result); |
+ request->SetResult( |
+ new WDResult<std::vector<WebIntentServiceData> >( |
+ WEB_INTENTS_RESULT, result)); |
+ } |
+ request->RequestComplete(); |
+} |
+ |
void WebDataService::GetAllWebIntentServicesImpl( |
GenericRequest<std::string>* request) { |
InitializeDatabaseIfNecessary(); |