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

Side by Side Diff: chrome/browser/autocomplete/contact_provider_chromeos.cc

Issue 19197005: Omnibox: Change |inline_autocomplete_offset| to |inline_autocompletion| (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop user_text() in omnibox_edit_model Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autocomplete/contact_provider_chromeos.h" 5 #include "chrome/browser/autocomplete/contact_provider_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 matches_.push_back(CreateAutocompleteMatch(input, contact)); 222 matches_.push_back(CreateAutocompleteMatch(input, contact));
223 matches_.back().contents_class = classifications; 223 matches_.back().contents_class = classifications;
224 } 224 }
225 225
226 AutocompleteMatch ContactProvider::CreateAutocompleteMatch( 226 AutocompleteMatch ContactProvider::CreateAutocompleteMatch(
227 const AutocompleteInput& input, 227 const AutocompleteInput& input,
228 const ContactData& contact) { 228 const ContactData& contact) {
229 AutocompleteMatch match(this, 0, false, AutocompleteMatchType::CONTACT); 229 AutocompleteMatch match(this, 0, false, AutocompleteMatchType::CONTACT);
230 match.inline_autocomplete_offset = string16::npos;
231 match.contents = contact.full_name; 230 match.contents = contact.full_name;
232 match.fill_into_edit = match.contents; 231 match.fill_into_edit = match.contents;
233 match.relevance = kBaseRelevance + 232 match.relevance = kBaseRelevance +
234 static_cast<int>(roundf(kAffinityRelevanceBoost * contact.affinity)); 233 static_cast<int>(roundf(kAffinityRelevanceBoost * contact.affinity));
235 match.RecordAdditionalInfo(kMatchContactIdKey, contact.contact_id); 234 match.RecordAdditionalInfo(kMatchContactIdKey, contact.contact_id);
236 return match; 235 return match;
237 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_match.cc ('k') | chrome/browser/autocomplete/extension_app_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698