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

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

Issue 12378016: chrome: Update include paths of string_split.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/browser/autofill/autocheckout/whitelist_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/i18n/string_search.h" 11 #include "base/i18n/string_search.h"
12 #include "base/string_split.h"
13 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/strings/string_split.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/autocomplete/autocomplete_input.h" 15 #include "chrome/browser/autocomplete/autocomplete_input.h"
16 #include "chrome/browser/chromeos/contacts/contact.pb.h" 16 #include "chrome/browser/chromeos/contacts/contact.pb.h"
17 #include "chrome/browser/chromeos/contacts/contact_manager.h" 17 #include "chrome/browser/chromeos/contacts/contact_manager.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 19
20 namespace { 20 namespace {
21 21
22 // Default affinity assigned to contacts whose |affinity| field is unset. 22 // Default affinity assigned to contacts whose |affinity| field is unset.
23 // TODO(derat): Set this to something reasonable (probably 0.0) once we're 23 // TODO(derat): Set this to something reasonable (probably 0.0) once we're
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const ContactData& contact) { 228 const ContactData& contact) {
229 AutocompleteMatch match(this, 0, false, AutocompleteMatch::CONTACT); 229 AutocompleteMatch match(this, 0, false, AutocompleteMatch::CONTACT);
230 match.inline_autocomplete_offset = string16::npos; 230 match.inline_autocomplete_offset = string16::npos;
231 match.contents = contact.full_name; 231 match.contents = contact.full_name;
232 match.fill_into_edit = match.contents; 232 match.fill_into_edit = match.contents;
233 match.relevance = kBaseRelevance + 233 match.relevance = kBaseRelevance +
234 static_cast<int>(roundf(kAffinityRelevanceBoost * contact.affinity)); 234 static_cast<int>(roundf(kAffinityRelevanceBoost * contact.affinity));
235 match.RecordAdditionalInfo(kMatchContactIdKey, contact.contact_id); 235 match.RecordAdditionalInfo(kMatchContactIdKey, contact.contact_id);
236 return match; 236 return match;
237 } 237 }
OLDNEW
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/browser/autofill/autocheckout/whitelist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698