| 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 00ce1c3114ec346a1647f214055335c09ce3703f..6b1caf5daec149a103ac27fae4530f50ccf2d6cf 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,18 @@ WebDataService::Handle WebDataService::GetWebIntents(const string16& action,
|
| return request->GetHandle();
|
| }
|
|
|
| +WebDataService::Handle WebDataService::GetWebIntentsForURL(
|
| + const string16& service_url,
|
| + WebDataServiceConsumer* consumer) {
|
| + DCHECK(consumer);
|
| + GenericRequest<string16>* request = new GenericRequest<string16>(
|
| + this, GetNextRequestHandle(), consumer, service_url);
|
| + RegisterRequest(request);
|
| + ScheduleTask(Bind(&WebDataService::GetWebIntentsForURLImpl, this, request));
|
| + return request->GetHandle();
|
| +}
|
| +
|
| +
|
| WebDataService::Handle WebDataService::GetAllWebIntents(
|
| WebDataServiceConsumer* consumer) {
|
| DCHECK(consumer);
|
| @@ -872,6 +885,20 @@ void WebDataService::GetWebIntentsImpl(GenericRequest<string16>* request) {
|
| request->RequestComplete();
|
| }
|
|
|
| +void WebDataService::GetWebIntentsForURLImpl(
|
| + GenericRequest<string16>* request) {
|
| + InitializeDatabaseIfNecessary();
|
| + if (db_ && !request->IsCancelled(NULL)) {
|
| + std::vector<WebIntentServiceData> result;
|
| + db_->GetWebIntentsTable()->GetWebIntentsForURL(
|
| + request->arg(), &result);
|
| + request->SetResult(
|
| + new WDResult<std::vector<WebIntentServiceData> >(
|
| + WEB_INTENTS_RESULT, result));
|
| + }
|
| + request->RequestComplete();
|
| +}
|
| +
|
| void WebDataService::GetAllWebIntentsImpl(
|
| GenericRequest<std::string>* request) {
|
| InitializeDatabaseIfNecessary();
|
|
|