OLD | NEW |
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/autocomplete_match.h" | 5 #include "chrome/browser/autocomplete/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 "chrome/browser/autocomplete/autocomplete_provider.h" | 14 #include "chrome/browser/autocomplete/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/theme_resources.h" | 18 #include "grit/theme_resources.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 bool IsTrivialClassification(const ACMatchClassifications& classifications) { | 22 bool IsTrivialClassification(const ACMatchClassifications& classifications) { |
22 return classifications.empty() || | 23 return classifications.empty() || |
23 ((classifications.size() == 1) && | 24 ((classifications.size() == 1) && |
24 (classifications.back().style == ACMatchClassification::NONE)); | 25 (classifications.back().style == ACMatchClassification::NONE)); |
25 } | 26 } |
26 | 27 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 << " is unsorted in relation to last offset of " << last_offset | 535 << " is unsorted in relation to last offset of " << last_offset |
535 << ". Provider: " << provider_name << "."; | 536 << ". Provider: " << provider_name << "."; |
536 DCHECK_LT(i->offset, text.length()) | 537 DCHECK_LT(i->offset, text.length()) |
537 << " Classification of [" << i->offset << "," << text.length() | 538 << " Classification of [" << i->offset << "," << text.length() |
538 << "] is out of bounds for \"" << text << "\". Provider: " | 539 << "] is out of bounds for \"" << text << "\". Provider: " |
539 << provider_name << "."; | 540 << provider_name << "."; |
540 last_offset = i->offset; | 541 last_offset = i->offset; |
541 } | 542 } |
542 } | 543 } |
543 #endif | 544 #endif |
OLD | NEW |