| OLD | NEW |
| 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 "components/omnibox/builtin_provider.h" | 5 #include "components/omnibox/builtin_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 BuiltinProvider::~BuiltinProvider() {} | 118 BuiltinProvider::~BuiltinProvider() {} |
| 119 | 119 |
| 120 void BuiltinProvider::AddMatch(const base::string16& match_string, | 120 void BuiltinProvider::AddMatch(const base::string16& match_string, |
| 121 const base::string16& inline_completion, | 121 const base::string16& inline_completion, |
| 122 const ACMatchClassifications& styles) { | 122 const ACMatchClassifications& styles) { |
| 123 AutocompleteMatch match(this, kRelevance, false, | 123 AutocompleteMatch match(this, kRelevance, false, |
| 124 AutocompleteMatchType::NAVSUGGEST); | 124 AutocompleteMatchType::NAVSUGGEST); |
| 125 match.fill_into_edit = match_string; | 125 match.fill_into_edit = match_string; |
| 126 match.inline_autocompletion = inline_completion; | 126 match.inline_autocompletion = inline_completion; |
| 127 match.StripLoneSlashOnInlineAutocompletion(); |
| 127 match.destination_url = GURL(match_string); | 128 match.destination_url = GURL(match_string); |
| 128 match.contents = match_string; | 129 match.contents = match_string; |
| 129 match.contents_class = styles; | 130 match.contents_class = styles; |
| 130 matches_.push_back(match); | 131 matches_.push_back(match); |
| 131 } | 132 } |
| OLD | NEW |