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

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: Merge to head Created 9 years, 2 months 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
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();

Powered by Google App Engine
This is Rietveld 408576698