OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/autocomplete_match_type.h" | 5 #include "chrome/common/autocomplete_match_type.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 | 8 |
9 // static | 9 // static |
10 std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) { | 10 std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) { |
11 const char* strings[] = { | 11 const char* strings[] = { |
12 "url-what-you-typed", | 12 "url-what-you-typed", |
13 "history-url", | 13 "history-url", |
14 "history-title", | 14 "history-title", |
15 "history-body", | 15 "history-body", |
16 "history-keyword", | 16 "history-keyword", |
17 "navsuggest", | 17 "navsuggest", |
18 "search-what-you-typed", | 18 "search-what-you-typed", |
19 "search-history", | 19 "search-history", |
20 "search-suggest", | 20 "search-suggest", |
21 "search-other-engine", | 21 "search-other-engine", |
22 "extension-app", | 22 "extension-app", |
23 "contact", | 23 "contact", |
24 "bookmark-title", | 24 "bookmark-title", |
| 25 "search-suggest-entity", |
| 26 "search-suggest-infinite" |
25 }; | 27 }; |
26 COMPILE_ASSERT(arraysize(strings) == AutocompleteMatchType::NUM_TYPES, | 28 COMPILE_ASSERT(arraysize(strings) == AutocompleteMatchType::NUM_TYPES, |
27 strings_array_must_match_type_enum); | 29 strings_array_must_match_type_enum); |
28 return strings[type]; | 30 return strings[type]; |
29 } | 31 } |
OLD | NEW |