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

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

Issue 8417043: Add webkit_glue namespace. Improve some variable and test names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error 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/intents/web_intents_registry.cc
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc
index 6e7c7ab8949f0c40ea7606c7bc4b52f7161bfa9a..7049c3d1af5a810e327e2b7bf494af12f60706c9 100644
--- a/chrome/browser/intents/web_intents_registry.cc
+++ b/chrome/browser/intents/web_intents_registry.cc
@@ -23,6 +23,8 @@ bool MimeTypesAreEqual(const string16& type1, const string16& type2) {
} // namespace
+using webkit_glue::WebIntentServiceData;
+
// Internal object representing all data associated with a single query.
struct WebIntentsRegistry::IntentsQuery {
// Unique query identifier.
@@ -73,8 +75,8 @@ void WebIntentsRegistry::OnWebDataServiceRequestDone(
DCHECK(query);
queries_.erase(it);
- IntentList matching_intents = static_cast<
- const WDResult<IntentList>*>(result)->GetValue();
+ IntentServiceList matching_services = static_cast<
+ const WDResult<IntentServiceList>*>(result)->GetValue();
// Loop over all intents in all extensions, collect ones matching the query.
if (extension_service_) {
@@ -82,26 +84,26 @@ void WebIntentsRegistry::OnWebDataServiceRequestDone(
if (extensions) {
for (ExtensionList::const_iterator i(extensions->begin());
i != extensions->end(); ++i) {
- const IntentList& intents((*i)->intents());
- for (IntentList::const_iterator j(intents.begin());
+ const IntentServiceList& intents((*i)->intents_services());
+ for (IntentServiceList::const_iterator j(intents.begin());
j != intents.end(); ++j) {
if (query->action_.empty() || query->action_ == j->action)
- matching_intents.push_back(*j);
+ matching_services.push_back(*j);
}
}
}
}
// Filter out all intents not matching the query type.
- IntentList::iterator iter(matching_intents.begin());
- while (iter != matching_intents.end()) {
+ IntentServiceList::iterator iter(matching_services.begin());
+ while (iter != matching_services.end()) {
if (MimeTypesAreEqual(iter->type, query->type_))
++iter;
else
- iter = matching_intents.erase(iter);
+ iter = matching_services.erase(iter);
}
- query->consumer_->OnIntentsQueryDone(query->query_id_, matching_intents);
+ query->consumer_->OnIntentsQueryDone(query->query_id_, matching_services);
delete query;
}
« 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