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/autocomplete/autocomplete_match.h" | 5 #include "components/omnibox/autocomplete_match.h" |
6 | 6 |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/autocomplete/autocomplete_provider.h" | 14 #include "components/omnibox/autocomplete_provider.h" |
15 #include "components/search_engines/template_url.h" | 15 #include "components/search_engines/template_url.h" |
16 #include "components/search_engines/template_url_service.h" | 16 #include "components/search_engines/template_url_service.h" |
17 #include "grit/component_scaled_resources.h" | 17 #include "grit/component_scaled_resources.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 bool IsTrivialClassification(const ACMatchClassifications& classifications) { | 21 bool IsTrivialClassification(const ACMatchClassifications& classifications) { |
22 return classifications.empty() || | 22 return classifications.empty() || |
23 ((classifications.size() == 1) && | 23 ((classifications.size() == 1) && |
24 (classifications.back().style == ACMatchClassification::NONE)); | 24 (classifications.back().style == ACMatchClassification::NONE)); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 << " is unsorted in relation to last offset of " << last_offset | 534 << " is unsorted in relation to last offset of " << last_offset |
535 << ". Provider: " << provider_name << "."; | 535 << ". Provider: " << provider_name << "."; |
536 DCHECK_LT(i->offset, text.length()) | 536 DCHECK_LT(i->offset, text.length()) |
537 << " Classification of [" << i->offset << "," << text.length() | 537 << " Classification of [" << i->offset << "," << text.length() |
538 << "] is out of bounds for \"" << text << "\". Provider: " | 538 << "] is out of bounds for \"" << text << "\". Provider: " |
539 << provider_name << "."; | 539 << provider_name << "."; |
540 last_offset = i->offset; | 540 last_offset = i->offset; |
541 } | 541 } |
542 } | 542 } |
543 #endif | 543 #endif |
OLD | NEW |