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

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

Issue 10834076: Refactor WebIntentsRegistry internals to use closures as WebDataService results handlers. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Small doc improvements (from review comments). Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/intents/web_intents_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/intents/web_intents_registry.h
diff --git a/chrome/browser/intents/web_intents_registry.h b/chrome/browser/intents/web_intents_registry.h
index 4e1e44046b2a40ab58abfd35d4d5ed52956f228d..5b0a710818f9a18d592c88368c0aed7ee24ba5f7 100644
--- a/chrome/browser/intents/web_intents_registry.h
+++ b/chrome/browser/intents/web_intents_registry.h
@@ -108,31 +108,36 @@ class WebIntentsRegistry : public ProfileKeyedService {
void CollapseIntents(IntentServiceList* services);
private:
- struct IntentsQuery;
- typedef std::vector<IntentsQuery*> QueryVector;
+ struct QueryParams;
+ class QueryAdapter;
+ typedef std::vector<QueryAdapter*> QueryVector;
// Handles services loaded
void OnWebIntentsResultReceived(
- IntentsQuery* query,
+ const QueryParams& params,
+ const QueryCallback& callback,
const WDTypedResult* result);
// Handles default services loaded
void OnWebIntentsDefaultsResultReceived(
- IntentsQuery* query,
+ const QueryParams& params,
+ const DefaultQueryCallback& callback,
const WDTypedResult* result);
// Implementation of GetIntentServicesForExtensionFilter.
- void DoGetIntentServicesForExtensionFilter(scoped_ptr<IntentsQuery> query,
- const std::string& extension_id);
+ void DoGetIntentServicesForExtensionFilter(
+ const QueryParams& params,
+ const std::string& extension_id,
+ const QueryCallback& callback);
const extensions::Extension* ExtensionForURL(const std::string& url);
// Adds a query to the list of pending queries.
- void TrackQuery(IntentsQuery* query);
+ void TrackQuery(QueryAdapter* query);
// Takes ownership of a query. This removes a query from the list
// of pending queries.
- void ReleaseQuery(IntentsQuery* query);
+ void ReleaseQuery(QueryAdapter* query);
// Map for all in-flight web data requests/intent queries.
QueryVector pending_queries_;
« no previous file with comments | « no previous file | chrome/browser/intents/web_intents_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698