Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2747)

Unified Diff: chrome/browser/webdata/web_data_service.cc

Issue 8144013: Add a check to the registry before the intent infobar is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix provider to service in comments. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_data_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_data_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698