Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 58003005: Modify Entity Suggestion support and Add Profile Suggest support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 IDR_OMNIBOX_HTTP, 141 IDR_OMNIBOX_HTTP,
142 IDR_OMNIBOX_SEARCH, 142 IDR_OMNIBOX_SEARCH,
143 IDR_OMNIBOX_SEARCH, 143 IDR_OMNIBOX_SEARCH,
144 IDR_OMNIBOX_SEARCH, 144 IDR_OMNIBOX_SEARCH,
145 IDR_OMNIBOX_SEARCH, 145 IDR_OMNIBOX_SEARCH,
146 IDR_OMNIBOX_EXTENSION_APP, 146 IDR_OMNIBOX_EXTENSION_APP,
147 // ContactProvider isn't used by the omnibox, so this icon is never 147 // ContactProvider isn't used by the omnibox, so this icon is never
148 // displayed. 148 // displayed.
149 IDR_OMNIBOX_SEARCH, 149 IDR_OMNIBOX_SEARCH,
150 IDR_OMNIBOX_HTTP, 150 IDR_OMNIBOX_HTTP,
151 IDR_OMNIBOX_SEARCH,
152 IDR_OMNIBOX_SEARCH,
151 }; 153 };
152 COMPILE_ASSERT(arraysize(icons) == AutocompleteMatchType::NUM_TYPES, 154 COMPILE_ASSERT(arraysize(icons) == AutocompleteMatchType::NUM_TYPES,
153 icons_array_must_match_type_enum); 155 icons_array_must_match_type_enum);
154 return icons[type]; 156 return icons[type];
155 } 157 }
156 158
157 // static 159 // static
158 int AutocompleteMatch::TypeToLocationBarIcon(Type type) { 160 int AutocompleteMatch::TypeToLocationBarIcon(Type type) {
159 int id = TypeToIcon(type); 161 int id = TypeToIcon(type);
160 if (id == IDR_OMNIBOX_HTTP) 162 if (id == IDR_OMNIBOX_HTTP)
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 << " is unsorted in relation to last offset of " << last_offset 487 << " is unsorted in relation to last offset of " << last_offset
486 << ". Provider: " << provider_name << "."; 488 << ". Provider: " << provider_name << ".";
487 DCHECK_LT(i->offset, text.length()) 489 DCHECK_LT(i->offset, text.length())
488 << " Classification of [" << i->offset << "," << text.length() 490 << " Classification of [" << i->offset << "," << text.length()
489 << "] is out of bounds for \"" << text << "\". Provider: " 491 << "] is out of bounds for \"" << text << "\". Provider: "
490 << provider_name << "."; 492 << provider_name << ".";
491 last_offset = i->offset; 493 last_offset = i->offset;
492 } 494 }
493 } 495 }
494 #endif 496 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.h » ('j') | chrome/browser/autocomplete/search_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698