| 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 } |
| 505 |
| 500 return format_types; | 506 return format_types; |
| 501 } | 507 } |
| 502 | 508 |
| 503 void AutocompleteMatch::ComputeStrippedDestinationURL( | 509 void AutocompleteMatch::ComputeStrippedDestinationURL( |
| 504 const AutocompleteInput& input, | 510 const AutocompleteInput& input, |
| 505 TemplateURLService* template_url_service) { | 511 TemplateURLService* template_url_service) { |
| 506 stripped_destination_url = GURLToStrippedGURL( | 512 stripped_destination_url = GURLToStrippedGURL( |
| 507 destination_url, input, template_url_service, keyword); | 513 destination_url, input, template_url_service, keyword); |
| 508 } | 514 } |
| 509 | 515 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 << " is unsorted in relation to last offset of " << last_offset | 644 << " is unsorted in relation to last offset of " << last_offset |
| 639 << ". Provider: " << provider_name << "."; | 645 << ". Provider: " << provider_name << "."; |
| 640 DCHECK_LT(i->offset, text.length()) | 646 DCHECK_LT(i->offset, text.length()) |
| 641 << " Classification of [" << i->offset << "," << text.length() | 647 << " Classification of [" << i->offset << "," << text.length() |
| 642 << "] is out of bounds for \"" << text << "\". Provider: " | 648 << "] is out of bounds for \"" << text << "\". Provider: " |
| 643 << provider_name << "."; | 649 << provider_name << "."; |
| 644 last_offset = i->offset; | 650 last_offset = i->offset; |
| 645 } | 651 } |
| 646 } | 652 } |
| 647 #endif | 653 #endif |
| OLD | NEW |