| 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 500 |
| 501 if (base::FeatureList::IsEnabled( | 501 if (base::FeatureList::IsEnabled( |
| 502 omnibox::kUIExperimentElideSuggestionUrlAfterHost)) { | 502 omnibox::kUIExperimentElideSuggestionUrlAfterHost)) { |
| 503 format_types |= url_formatter::kFormatUrlExperimentalElideAfterHost; | 503 format_types |= url_formatter::kFormatUrlExperimentalElideAfterHost; |
| 504 } | 504 } |
| 505 |
| 506 if (base::FeatureList::IsEnabled( |
| 507 omnibox::kUIExperimentHideSuggestionUrlTrivialSubdomains)) { |
| 508 format_types |= url_formatter::kFormatUrlExperimentalOmitTrivialSubdomains; |
| 509 } |
| 510 |
| 505 return format_types; | 511 return format_types; |
| 506 } | 512 } |
| 507 | 513 |
| 508 void AutocompleteMatch::ComputeStrippedDestinationURL( | 514 void AutocompleteMatch::ComputeStrippedDestinationURL( |
| 509 const AutocompleteInput& input, | 515 const AutocompleteInput& input, |
| 510 TemplateURLService* template_url_service) { | 516 TemplateURLService* template_url_service) { |
| 511 stripped_destination_url = GURLToStrippedGURL( | 517 stripped_destination_url = GURLToStrippedGURL( |
| 512 destination_url, input, template_url_service, keyword); | 518 destination_url, input, template_url_service, keyword); |
| 513 } | 519 } |
| 514 | 520 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 << " is unsorted in relation to last offset of " << last_offset | 649 << " is unsorted in relation to last offset of " << last_offset |
| 644 << ". Provider: " << provider_name << "."; | 650 << ". Provider: " << provider_name << "."; |
| 645 DCHECK_LT(i->offset, text.length()) | 651 DCHECK_LT(i->offset, text.length()) |
| 646 << " Classification of [" << i->offset << "," << text.length() | 652 << " Classification of [" << i->offset << "," << text.length() |
| 647 << "] is out of bounds for \"" << text << "\". Provider: " | 653 << "] is out of bounds for \"" << text << "\". Provider: " |
| 648 << provider_name << "."; | 654 << provider_name << "."; |
| 649 last_offset = i->offset; | 655 last_offset = i->offset; |
| 650 } | 656 } |
| 651 } | 657 } |
| 652 #endif | 658 #endif |
| OLD | NEW |