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

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

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot string implementation Created 5 years, 6 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 "chrome/browser/autocomplete/history_quick_provider.h" 5 #include "chrome/browser/autocomplete/history_quick_provider.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // last character typed is a slash. That slash is removed by the 263 // last character typed is a slash. That slash is removed by the
264 // FormatURLWithOffsets call above. 264 // FormatURLWithOffsets call above.
265 if (inline_autocomplete_offset < match.fill_into_edit.length()) { 265 if (inline_autocomplete_offset < match.fill_into_edit.length()) {
266 match.inline_autocompletion = 266 match.inline_autocompletion =
267 match.fill_into_edit.substr(inline_autocomplete_offset); 267 match.fill_into_edit.substr(inline_autocomplete_offset);
268 } 268 }
269 match.allowed_to_be_default_match = match.inline_autocompletion.empty() || 269 match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
270 !PreventInlineAutocomplete(autocomplete_input_); 270 !PreventInlineAutocomplete(autocomplete_input_);
271 } 271 }
272 match.EnsureUWYTIsAllowedToBeDefault( 272 match.EnsureUWYTIsAllowedToBeDefault(
273 autocomplete_input_.canonicalized_url(), 273 autocomplete_input_,
274 TemplateURLServiceFactory::GetForProfile(profile_)); 274 TemplateURLServiceFactory::GetForProfile(profile_));
275 275
276 // Format the description autocomplete presentation. 276 // Format the description autocomplete presentation.
277 match.description = info.title(); 277 match.description = info.title();
278 match.description_class = SpansFromTermMatch( 278 match.description_class = SpansFromTermMatch(
279 history_match.title_matches, match.description.length(), false); 279 history_match.title_matches, match.description.length(), false);
280 280
281 match.RecordAdditionalInfo("typed count", info.typed_count()); 281 match.RecordAdditionalInfo("typed count", info.typed_count());
282 match.RecordAdditionalInfo("visit count", info.visit_count()); 282 match.RecordAdditionalInfo("visit count", info.visit_count());
283 match.RecordAdditionalInfo("last visit", info.last_visit()); 283 match.RecordAdditionalInfo("last visit", info.last_visit());
284 284
285 return match; 285 return match;
286 } 286 }
OLDNEW
« no previous file with comments | « base/strings/string_util.cc ('k') | chrome/browser/autocomplete/history_url_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698