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

Issue 10916304: autocomplete: Make ContactProvider rank contacts by affinity (Closed)

Created:
8 years, 3 months ago by Daniel Erat
Modified:
8 years, 3 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, nkostylev+watch_chromium.org, derat+watch_chromium.org, oshima+watch_chromium.org, James Su, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

autocomplete: Make ContactProvider rank contacts by affinity This adds an 'affinity' field to the contacts::Contact protocol message and makes the ContactProvider class use it to order matches. BUG=141877 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156883

Patch Set 1 #

Total comments: 14

Patch Set 2 : merge #

Patch Set 3 : apply review comments #

Patch Set 4 : improve error messages #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -21 lines) Patch
M chrome/browser/autocomplete/contact_provider_chromeos.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/contact_provider_chromeos.cc View 1 2 9 chunks +37 lines, -7 lines 0 comments Download
M chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc View 1 2 3 4 chunks +68 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/contacts/contact.proto View 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Daniel Erat
https://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc File chrome/browser/autocomplete/contact_provider_chromeos.cc (right): https://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc#newcode65 chrome/browser/autocomplete/contact_provider_chromeos.cc:65: const int ContactProvider::kBaseRelevance = 1300; I just pulled numbers ...
8 years, 3 months ago (2012-09-13 23:10:08 UTC) #1
Peter Kasting
LGTM https://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc File chrome/browser/autocomplete/contact_provider_chromeos.cc (right): https://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc#newcode23 chrome/browser/autocomplete/contact_provider_chromeos.cc:23: float kDefaultAffinity = 1.0; Isn't this kind of ...
8 years, 3 months ago (2012-09-13 23:32:37 UTC) #2
Daniel Erat
http://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc File chrome/browser/autocomplete/contact_provider_chromeos.cc (right): http://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos.cc#newcode23 chrome/browser/autocomplete/contact_provider_chromeos.cc:23: float kDefaultAffinity = 1.0; On 2012/09/13 23:32:37, Peter Kasting ...
8 years, 3 months ago (2012-09-14 15:31:50 UTC) #3
Peter Kasting
LGTM http://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc File chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc (right): http://codereview.chromium.org/10916304/diff/1/chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc#newcode94 chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc:94: CHECK(contact) << "Unable to find contact " << ...
8 years, 3 months ago (2012-09-14 18:05:52 UTC) #4
Daniel Erat
On Fri, Sep 14, 2012 at 2:05 PM, <pkasting@chromium.org> wrote: > LGTM > > > ...
8 years, 3 months ago (2012-09-14 18:27:06 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/10916304/2002
8 years, 3 months ago (2012-09-14 18:28:12 UTC) #6
commit-bot: I haz the power
Change committed as 156883
8 years, 3 months ago (2012-09-14 20:56:27 UTC) #7
Peter Kasting
(Sorry, was afk 2 hours) I see what you mean. In that case I'd either ...
8 years, 3 months ago (2012-09-14 21:03:21 UTC) #8
Daniel Erat
On Fri, Sep 14, 2012 at 5:03 PM, <pkasting@chromium.org> wrote: > (Sorry, was afk 2 ...
8 years, 3 months ago (2012-09-16 13:08:35 UTC) #9
Peter Kasting
On 2012/09/16 13:08:35, Daniel Erat wrote: > On Fri, Sep 14, 2012 at 5:03 PM, ...
8 years, 3 months ago (2012-09-17 02:34:34 UTC) #10
Daniel Erat
On Sun, Sep 16, 2012 at 7:34 PM, <pkasting@chromium.org> wrote: > On 2012/09/16 13:08:35, Daniel ...
8 years, 3 months ago (2012-09-18 20:19:46 UTC) #11
Peter Kasting
8 years, 3 months ago (2012-09-18 20:26:56 UTC) #12
On 2012/09/18 20:19:46, Daniel Erat wrote:
> Following up on this: what are the reasons to prefer DCHECK over CHECK
> here?  Are tests ever built in non-debug mode?

We always use DCHECK except where (a) we're temporarily using CHECK in order to
track down what assertions are being violated on the trail of some bug, or (b)
violating this assertion would cause a security hole (e.g. we start sending
private data to an attacker-controlled renderer) and thus we must crash Chrome
instead.

Powered by Google App Engine
This is Rietveld 408576698