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

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: new approach Created 5 years, 8 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // FormatURLWithOffsets call above. 267 // FormatURLWithOffsets call above.
268 if (inline_autocomplete_offset < match.fill_into_edit.length()) { 268 if (inline_autocomplete_offset < match.fill_into_edit.length()) {
269 match.inline_autocompletion = 269 match.inline_autocompletion =
270 match.fill_into_edit.substr(inline_autocomplete_offset); 270 match.fill_into_edit.substr(inline_autocomplete_offset);
271 } 271 }
272 match.allowed_to_be_default_match = match.inline_autocompletion.empty() || 272 match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
273 !PreventInlineAutocomplete(autocomplete_input_); 273 !PreventInlineAutocomplete(autocomplete_input_);
274 } 274 }
275 match.EnsureUWYTIsAllowedToBeDefault( 275 match.EnsureUWYTIsAllowedToBeDefault(
276 autocomplete_input_.canonicalized_url(), 276 autocomplete_input_.canonicalized_url(),
277 autocomplete_input_.parts().scheme.is_nonempty(),
277 TemplateURLServiceFactory::GetForProfile(profile_)); 278 TemplateURLServiceFactory::GetForProfile(profile_));
278 279
279 // Format the description autocomplete presentation. 280 // Format the description autocomplete presentation.
280 match.description = info.title(); 281 match.description = info.title();
281 match.description_class = SpansFromTermMatch( 282 match.description_class = SpansFromTermMatch(
282 history_match.title_matches, match.description.length(), false); 283 history_match.title_matches, match.description.length(), false);
283 284
284 match.RecordAdditionalInfo("typed count", info.typed_count()); 285 match.RecordAdditionalInfo("typed count", info.typed_count());
285 match.RecordAdditionalInfo("visit count", info.visit_count()); 286 match.RecordAdditionalInfo("visit count", info.visit_count());
286 match.RecordAdditionalInfo("last visit", info.last_visit()); 287 match.RecordAdditionalInfo("last visit", info.last_visit());
287 288
288 return match; 289 return match;
289 } 290 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_url_provider_unittest.cc » ('j') | components/omnibox/autocomplete_match.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698