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

Unified Diff: chrome/browser/intents/web_intents_registry.cc

Issue 10854019: Make GetIntentServicesForExtensionFilter work synchronously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GetIntentServicesForExtensionFilter synchronous. Created 8 years, 4 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/intents/web_intents_registry.cc
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc
index 856fe3c991a9516a01d0de98a0be813d8afc9964..daeb1a3b716247a00e4c1cf7f260d7dfaca98db0 100644
--- a/chrome/browser/intents/web_intents_registry.cc
+++ b/chrome/browser/intents/web_intents_registry.cc
@@ -405,38 +405,15 @@ void WebIntentsRegistry::GetIntentServicesForExtensionFilter(
const string16& action,
const string16& type,
const std::string& extension_id,
- const QueryCallback& callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- DCHECK(!callback.is_null());
-
- const QueryParams params(action, type);
- content::BrowserThread::PostTask(
- content::BrowserThread::UI,
- FROM_HERE,
- base::Bind(
- &WebIntentsRegistry::DoGetIntentServicesForExtensionFilter,
- base::Unretained(this),
- params,
- extension_id,
- callback));
-}
-
-void WebIntentsRegistry::DoGetIntentServicesForExtensionFilter(
- const QueryParams& params,
- const std::string& extension_id,
- const QueryCallback& callback) {
- IntentServiceList matching_services;
-
+ IntentServiceList* services) {
if (extension_service_) {
const Extension* extension =
extension_service_->GetExtensionById(extension_id, false);
AddMatchingServicesForExtension(*extension,
- params.action_,
- &matching_services);
- FilterServicesByType(params.type_, &matching_services);
+ action,
+ services);
+ FilterServicesByType(type, services);
}
-
- callback.Run(matching_services);
}
void WebIntentsRegistry::RegisterDefaultIntentService(
« no previous file with comments | « chrome/browser/intents/web_intents_registry.h ('k') | chrome/browser/intents/web_intents_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698