| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/autocomplete_match.h" | 5 #include "components/omnibox/browser/autocomplete_match.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 // static | 490 // static |
| 491 url_formatter::FormatUrlTypes AutocompleteMatch::GetFormatTypes( | 491 url_formatter::FormatUrlTypes AutocompleteMatch::GetFormatTypes( |
| 492 bool trim_scheme) { | 492 bool trim_scheme) { |
| 493 auto format_types = url_formatter::kFormatUrlOmitAll; | 493 auto format_types = url_formatter::kFormatUrlOmitAll; |
| 494 if (!trim_scheme) { | 494 if (!trim_scheme) { |
| 495 format_types &= ~url_formatter::kFormatUrlOmitHTTP; | 495 format_types &= ~url_formatter::kFormatUrlOmitHTTP; |
| 496 } else if (base::FeatureList::IsEnabled( | 496 } else if (base::FeatureList::IsEnabled( |
| 497 omnibox::kUIExperimentHideSuggestionUrlScheme)) { | 497 omnibox::kUIExperimentHideSuggestionUrlScheme)) { |
| 498 format_types |= url_formatter::kFormatUrlExperimentalOmitHTTPS; | 498 format_types |= url_formatter::kFormatUrlExperimentalOmitHTTPS; |
| 499 } | 499 } |
| 500 |
| 501 if (base::FeatureList::IsEnabled( |
| 502 omnibox::kUIExperimentElideSuggestionUrlAfterHost)) { |
| 503 format_types |= url_formatter::kFormatUrlExperimentalElideAfterHost; |
| 504 } |
| 500 return format_types; | 505 return format_types; |
| 501 } | 506 } |
| 502 | 507 |
| 503 void AutocompleteMatch::ComputeStrippedDestinationURL( | 508 void AutocompleteMatch::ComputeStrippedDestinationURL( |
| 504 const AutocompleteInput& input, | 509 const AutocompleteInput& input, |
| 505 TemplateURLService* template_url_service) { | 510 TemplateURLService* template_url_service) { |
| 506 stripped_destination_url = GURLToStrippedGURL( | 511 stripped_destination_url = GURLToStrippedGURL( |
| 507 destination_url, input, template_url_service, keyword); | 512 destination_url, input, template_url_service, keyword); |
| 508 } | 513 } |
| 509 | 514 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 << " is unsorted in relation to last offset of " << last_offset | 643 << " is unsorted in relation to last offset of " << last_offset |
| 639 << ". Provider: " << provider_name << "."; | 644 << ". Provider: " << provider_name << "."; |
| 640 DCHECK_LT(i->offset, text.length()) | 645 DCHECK_LT(i->offset, text.length()) |
| 641 << " Classification of [" << i->offset << "," << text.length() | 646 << " Classification of [" << i->offset << "," << text.length() |
| 642 << "] is out of bounds for \"" << text << "\". Provider: " | 647 << "] is out of bounds for \"" << text << "\". Provider: " |
| 643 << provider_name << "."; | 648 << provider_name << "."; |
| 644 last_offset = i->offset; | 649 last_offset = i->offset; |
| 645 } | 650 } |
| 646 } | 651 } |
| 647 #endif | 652 #endif |
| OLD | NEW |