| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 IDR_OMNIBOX_HTTP, | 143 IDR_OMNIBOX_HTTP, |
| 144 IDR_OMNIBOX_SEARCH, | 144 IDR_OMNIBOX_SEARCH, |
| 145 IDR_OMNIBOX_SEARCH, | 145 IDR_OMNIBOX_SEARCH, |
| 146 IDR_OMNIBOX_SEARCH, | 146 IDR_OMNIBOX_SEARCH, |
| 147 IDR_OMNIBOX_SEARCH, | 147 IDR_OMNIBOX_SEARCH, |
| 148 IDR_OMNIBOX_SEARCH, | 148 IDR_OMNIBOX_SEARCH, |
| 149 IDR_OMNIBOX_SEARCH, | 149 IDR_OMNIBOX_SEARCH, |
| 150 IDR_OMNIBOX_SEARCH, | 150 IDR_OMNIBOX_SEARCH, |
| 151 IDR_OMNIBOX_SEARCH, | 151 IDR_OMNIBOX_SEARCH, |
| 152 IDR_OMNIBOX_EXTENSION_APP, | 152 IDR_OMNIBOX_EXTENSION_APP, |
| 153 // ContactProvider isn't used by the omnibox, so this icon is never | |
| 154 // displayed. | |
| 155 IDR_OMNIBOX_SEARCH, | 153 IDR_OMNIBOX_SEARCH, |
| 156 IDR_OMNIBOX_HTTP, | 154 IDR_OMNIBOX_HTTP, |
| 157 }; | 155 }; |
| 158 COMPILE_ASSERT(arraysize(icons) == AutocompleteMatchType::NUM_TYPES, | 156 COMPILE_ASSERT(arraysize(icons) == AutocompleteMatchType::NUM_TYPES, |
| 159 icons_array_must_match_type_enum); | 157 icons_array_must_match_type_enum); |
| 160 return icons[type]; | 158 return icons[type]; |
| 161 } | 159 } |
| 162 | 160 |
| 163 // static | 161 // static |
| 164 int AutocompleteMatch::TypeToLocationBarIcon(Type type) { | 162 int AutocompleteMatch::TypeToLocationBarIcon(Type type) { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 << " is unsorted in relation to last offset of " << last_offset | 506 << " is unsorted in relation to last offset of " << last_offset |
| 509 << ". Provider: " << provider_name << "."; | 507 << ". Provider: " << provider_name << "."; |
| 510 DCHECK_LT(i->offset, text.length()) | 508 DCHECK_LT(i->offset, text.length()) |
| 511 << " Classification of [" << i->offset << "," << text.length() | 509 << " Classification of [" << i->offset << "," << text.length() |
| 512 << "] is out of bounds for \"" << text << "\". Provider: " | 510 << "] is out of bounds for \"" << text << "\". Provider: " |
| 513 << provider_name << "."; | 511 << provider_name << "."; |
| 514 last_offset = i->offset; | 512 last_offset = i->offset; |
| 515 } | 513 } |
| 516 } | 514 } |
| 517 #endif | 515 #endif |
| OLD | NEW |