| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 return classifications.empty() || | 24 return classifications.empty() || |
| 25 ((classifications.size() == 1) && | 25 ((classifications.size() == 1) && |
| 26 (classifications.back().style == ACMatchClassification::NONE)); | 26 (classifications.back().style == ACMatchClassification::NONE)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace | 29 } // namespace |
| 30 | 30 |
| 31 // AutocompleteMatch ---------------------------------------------------------- | 31 // AutocompleteMatch ---------------------------------------------------------- |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 const char16 AutocompleteMatch::kInvalidChars[] = { | 34 const base::char16 AutocompleteMatch::kInvalidChars[] = { |
| 35 '\n', '\r', '\t', | 35 '\n', '\r', '\t', |
| 36 0x2028, // Line separator | 36 0x2028, // Line separator |
| 37 0x2029, // Paragraph separator | 37 0x2029, // Paragraph separator |
| 38 0 | 38 0 |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 AutocompleteMatch::AutocompleteMatch() | 41 AutocompleteMatch::AutocompleteMatch() |
| 42 : provider(NULL), | 42 : provider(NULL), |
| 43 relevance(0), | 43 relevance(0), |
| 44 typed_count(-1), | 44 typed_count(-1), |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 << " is unsorted in relation to last offset of " << last_offset | 490 << " is unsorted in relation to last offset of " << last_offset |
| 491 << ". Provider: " << provider_name << "."; | 491 << ". Provider: " << provider_name << "."; |
| 492 DCHECK_LT(i->offset, text.length()) | 492 DCHECK_LT(i->offset, text.length()) |
| 493 << " Classification of [" << i->offset << "," << text.length() | 493 << " Classification of [" << i->offset << "," << text.length() |
| 494 << "] is out of bounds for \"" << text << "\". Provider: " | 494 << "] is out of bounds for \"" << text << "\". Provider: " |
| 495 << provider_name << "."; | 495 << provider_name << "."; |
| 496 last_offset = i->offset; | 496 last_offset = i->offset; |
| 497 } | 497 } |
| 498 } | 498 } |
| 499 #endif | 499 #endif |
| OLD | NEW |