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

Side by Side Diff: components/omnibox/browser/autocomplete_match.cc

Issue 1718563002: Convert location bar decorations to Material Design (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_toolbar
Patch Set: Fix issue from browser test. Created 4 years, 9 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/omnibox/browser/autocomplete_match.h" 5 #include "components/omnibox/browser/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/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 IDR_OMNIBOX_SEARCH, // VOICE_SEARCH 219 IDR_OMNIBOX_SEARCH, // VOICE_SEARCH
220 }; 220 };
221 #endif 221 #endif
222 static_assert(arraysize(kIcons) == AutocompleteMatchType::NUM_TYPES, 222 static_assert(arraysize(kIcons) == AutocompleteMatchType::NUM_TYPES,
223 "icons array must have NUM_TYPES elements"); 223 "icons array must have NUM_TYPES elements");
224 return kIcons[type]; 224 return kIcons[type];
225 } 225 }
226 226
227 // static 227 // static
228 gfx::VectorIconId AutocompleteMatch::TypeToVectorIcon(Type type) { 228 gfx::VectorIconId AutocompleteMatch::TypeToVectorIcon(Type type) {
229 #if !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS) 229 #if !defined(OS_ANDROID) && !defined(OS_IOS)
230 static const gfx::VectorIconId kIcons[] = { 230 static const gfx::VectorIconId kIcons[] = {
231 gfx::VectorIconId::OMNIBOX_HTTP, // URL_WHAT_YOU_TYPE 231 gfx::VectorIconId::OMNIBOX_HTTP, // URL_WHAT_YOU_TYPE
232 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_URL 232 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_URL
233 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_TITLE 233 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_TITLE
234 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_BODY 234 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_BODY
235 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_KEYWORD 235 gfx::VectorIconId::OMNIBOX_HTTP, // HISTORY_KEYWORD
236 gfx::VectorIconId::OMNIBOX_HTTP, // NAVSUGGEST 236 gfx::VectorIconId::OMNIBOX_HTTP, // NAVSUGGEST
237 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_WHAT_YOU_TYPED 237 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_WHAT_YOU_TYPED
238 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_HISTORY 238 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_HISTORY
239 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_SUGGEST 239 gfx::VectorIconId::OMNIBOX_SEARCH, // SEARCH_SUGGEST
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 << " is unsorted in relation to last offset of " << last_offset 664 << " is unsorted in relation to last offset of " << last_offset
665 << ". Provider: " << provider_name << "."; 665 << ". Provider: " << provider_name << ".";
666 DCHECK_LT(i->offset, text.length()) 666 DCHECK_LT(i->offset, text.length())
667 << " Classification of [" << i->offset << "," << text.length() 667 << " Classification of [" << i->offset << "," << text.length()
668 << "] is out of bounds for \"" << text << "\". Provider: " 668 << "] is out of bounds for \"" << text << "\". Provider: "
669 << provider_name << "."; 669 << provider_name << ".";
670 last_offset = i->offset; 670 last_offset = i->offset;
671 } 671 }
672 } 672 }
673 #endif 673 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | components/omnibox/browser/omnibox_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698