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

Side by Side Diff: components/omnibox/builtin_provider.cc

Issue 1215233003: Reland - Omnibox - Mark As Duplicates URLs that only differ by a trailing slash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move const Created 5 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
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 "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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698