Index: chrome/browser/intents/web_intents_registry.cc |
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc |
index 9669528c4e9621ebcb0f81d4954cb6a5a1c55a42..34153b1e1a5e73ccf29dddabb3c04b06c982166e 100644 |
--- a/chrome/browser/intents/web_intents_registry.cc |
+++ b/chrome/browser/intents/web_intents_registry.cc |
@@ -265,6 +265,19 @@ void WebIntentsRegistry::OnWebIntentsResultReceived( |
callback.Run(matching_services); |
} |
+void WebIntentsRegistry::OnAllDefaultIntentServicesReceived( |
+ const DefaultIntentServicesCallback& callback, |
+ const WDTypedResult* result) { |
+ DCHECK(result); |
+ DCHECK(result->GetType() == WEB_INTENTS_DEFAULTS_RESULT); |
+ |
+ const std::vector<DefaultWebIntentService> services = static_cast< |
+ const WDResult<std::vector<DefaultWebIntentService> >*>(result)-> |
+ GetValue(); |
+ |
+ callback.Run(services); |
+} |
+ |
void WebIntentsRegistry::OnWebIntentsDefaultsResultReceived( |
const QueryParams& params, |
const DefaultQueryCallback& callback, |
@@ -359,6 +372,20 @@ void WebIntentsRegistry::GetAllIntentServices( |
query->query_handle_ = wds_->GetAllWebIntentServices(query); |
} |
+void WebIntentsRegistry::GetAllDefaultIntentServices( |
+ const DefaultIntentServicesCallback& callback) { |
+ DCHECK(!callback.is_null()); |
+ |
+ ResultsHandler handler = base::Bind( |
+ &WebIntentsRegistry::OnAllDefaultIntentServicesReceived, |
+ base::Unretained(this), |
+ callback); |
+ |
+ QueryAdapter* query = new QueryAdapter(this, handler); |
+ query->query_handle_ = |
+ wds_->GetAllDefaultWebIntentServices(query); |
+} |
+ |
void WebIntentsRegistry::IntentServiceExists( |
const WebIntentServiceData& service, |
const base::Callback<void(bool)>& callback) { |