| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_provider.h" | 10 #include "chrome/browser/autocomplete/autocomplete_provider.h" |
| 11 #include "chrome/browser/search_engines/template_url.h" | 11 #include "chrome/browser/search_engines/template_url.h" |
| 12 #include "chrome/browser/search_engines/template_url_service.h" | 12 #include "chrome/browser/search_engines/template_url_service.h" |
| 13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
| 15 #include "grit/theme_resources_standard.h" | |
| 16 | 15 |
| 17 // AutocompleteMatch ---------------------------------------------------------- | 16 // AutocompleteMatch ---------------------------------------------------------- |
| 18 | 17 |
| 19 // static | 18 // static |
| 20 const char16 AutocompleteMatch::kInvalidChars[] = { | 19 const char16 AutocompleteMatch::kInvalidChars[] = { |
| 21 '\n', '\r', '\t', | 20 '\n', '\r', '\t', |
| 22 0x2028, // Line separator | 21 0x2028, // Line separator |
| 23 0x2029, // Paragraph separator | 22 0x2029, // Paragraph separator |
| 24 0 | 23 0 |
| 25 }; | 24 }; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 << " is unsorted in relation to last offset of " << last_offset | 349 << " is unsorted in relation to last offset of " << last_offset |
| 351 << ". Provider: " << (provider ? provider->name() : "None") << "."; | 350 << ". Provider: " << (provider ? provider->name() : "None") << "."; |
| 352 DCHECK_LT(i->offset, text.length()) | 351 DCHECK_LT(i->offset, text.length()) |
| 353 << " Classification of [" << i->offset << "," << text.length() | 352 << " Classification of [" << i->offset << "," << text.length() |
| 354 << "] is out of bounds for \"" << text << "\". Provider: " | 353 << "] is out of bounds for \"" << text << "\". Provider: " |
| 355 << (provider ? provider->name() : "None") << "."; | 354 << (provider ? provider->name() : "None") << "."; |
| 356 last_offset = i->offset; | 355 last_offset = i->offset; |
| 357 } | 356 } |
| 358 } | 357 } |
| 359 #endif | 358 #endif |
| OLD | NEW |