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

Unified Diff: chrome/browser/autocomplete/contact_provider_chromeos.h

Issue 10916304: autocomplete: Make ContactProvider rank contacts by affinity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: improve error messages Created 8 years, 3 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/autocomplete/contact_provider_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/contact_provider_chromeos.h
diff --git a/chrome/browser/autocomplete/contact_provider_chromeos.h b/chrome/browser/autocomplete/contact_provider_chromeos.h
index 9880aa0bb42274c30e73b36096858b64419ec9b4..1a14a386c34cc0bf8c84b68d7d2f404765d63368 100644
--- a/chrome/browser/autocomplete/contact_provider_chromeos.h
+++ b/chrome/browser/autocomplete/contact_provider_chromeos.h
@@ -48,6 +48,9 @@ class ContactProvider : public AutocompleteProvider,
virtual ~ContactProvider();
+ // Returns true if |a|'s affinity is greater than |b|'s affinity.
+ static bool CompareAffinity(const ContactData& a, const ContactData& b);
+
// Updates |contacts_| to match the contacts currently reported by
// ContactManager.
void RefreshContacts();
@@ -65,7 +68,7 @@ class ContactProvider : public AutocompleteProvider,
base::WeakPtr<contacts::ContactManagerInterface> contact_manager_;
- // Contacts through which we search.
+ // Contacts through which we search, ordered by descending affinity.
ContactDataVector contacts_;
DISALLOW_COPY_AND_ASSIGN(ContactProvider);
« no previous file with comments | « no previous file | chrome/browser/autocomplete/contact_provider_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698