OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/builtin_provider.h" | 5 #include "chrome/browser/autocomplete/builtin_provider.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/browser_about_handler.h" | 9 #include "chrome/browser/browser_about_handler.h" |
10 #include "chrome/browser/net/url_fixer_upper.h" | 10 #include "chrome/browser/net/url_fixer_upper.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 for (size_t i = 0; i < matches_.size(); ++i) | 112 for (size_t i = 0; i < matches_.size(); ++i) |
113 matches_[i].relevance = kRelevance + matches_.size() - (i + 1); | 113 matches_[i].relevance = kRelevance + matches_.size() - (i + 1); |
114 } | 114 } |
115 | 115 |
116 void BuiltinProvider::AddMatch(const string16& match_string, | 116 void BuiltinProvider::AddMatch(const string16& match_string, |
117 const ACMatchClassifications& styles) { | 117 const ACMatchClassifications& styles) { |
118 AutocompleteMatch match(this, kRelevance, false, | 118 AutocompleteMatch match(this, kRelevance, 0.0f, false, |
119 AutocompleteMatch::NAVSUGGEST); | 119 AutocompleteMatch::NAVSUGGEST); |
120 match.fill_into_edit = match_string; | 120 match.fill_into_edit = match_string; |
121 match.destination_url = GURL(match_string); | 121 match.destination_url = GURL(match_string); |
122 match.contents = match_string; | 122 match.contents = match_string; |
123 match.contents_class = styles; | 123 match.contents_class = styles; |
124 matches_.push_back(match); | 124 matches_.push_back(match); |
125 } | 125 } |
OLD | NEW |