| 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 "chrome/browser/search_engines/template_url_service.h" |
| 15 #include "components/search_engines/template_url.h" | 16 #include "components/search_engines/template_url.h" |
| 16 #include "components/search_engines/template_url_service.h" | |
| 17 #include "grit/theme_resources.h" | 17 #include "grit/theme_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)); |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 << " is unsorted in relation to last offset of " << last_offset | 513 << " is unsorted in relation to last offset of " << last_offset |
| 514 << ". Provider: " << provider_name << "."; | 514 << ". Provider: " << provider_name << "."; |
| 515 DCHECK_LT(i->offset, text.length()) | 515 DCHECK_LT(i->offset, text.length()) |
| 516 << " Classification of [" << i->offset << "," << text.length() | 516 << " Classification of [" << i->offset << "," << text.length() |
| 517 << "] is out of bounds for \"" << text << "\". Provider: " | 517 << "] is out of bounds for \"" << text << "\". Provider: " |
| 518 << provider_name << "."; | 518 << provider_name << "."; |
| 519 last_offset = i->offset; | 519 last_offset = i->offset; |
| 520 } | 520 } |
| 521 } | 521 } |
| 522 #endif | 522 #endif |
| OLD | NEW |