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

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: 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
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..ca873ad87da87d9e32688a8c35565f6ca4cd5ac0 100644
--- a/chrome/browser/autocomplete/contact_provider_chromeos.h
+++ b/chrome/browser/autocomplete/contact_provider_chromeos.h
@@ -30,6 +30,12 @@ class ContactProvider : public AutocompleteProvider,
// contact's ID is stored.
static const char kMatchContactIdKey[];
+ // Base match relevance assigned to a contact with an affinity of 0.0.
+ static const int kBaseRelevance;
+
+ // Maximum boost to relevance for a contact with an affinity of 1.0.
+ static const int kAffinityRelevanceBoost;
+
ContactProvider(
AutocompleteProviderListener* listener,
Profile* profile,
@@ -65,7 +71,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);

Powered by Google App Engine
This is Rietveld 408576698