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

Side by Side Diff: chrome/browser/toolbar_model.cc

Issue 1560015: Replace omnibox icons with new set that are all the same size (19x19).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/toolbar_model.h" 5 #include "chrome/browser/toolbar_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/cert_store.h" 9 #include "chrome/browser/cert_store.h"
10 #include "chrome/browser/pref_service.h" 10 #include "chrome/browser/pref_service.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return SECURE; 87 return SECURE;
88 88
89 default: 89 default:
90 NOTREACHED(); 90 NOTREACHED();
91 return NONE; 91 return NONE;
92 } 92 }
93 } 93 }
94 94
95 int ToolbarModel::GetIcon() const { 95 int ToolbarModel::GetIcon() const {
96 static int icon_ids[NUM_SECURITY_LEVELS] = { 96 static int icon_ids[NUM_SECURITY_LEVELS] = {
97 IDR_O2_GLOBE, 97 IDR_OMNIBOX_HTTP,
98 IDR_EV_SECURE, 98 IDR_OMNIBOX_HTTPS_GREEN,
99 IDR_SECURE, 99 IDR_OMNIBOX_HTTPS_VALID,
100 IDR_SECURITY_WARNING, 100 IDR_OMNIBOX_HTTPS_WARNING,
101 IDR_SECURITY_ERROR, 101 IDR_OMNIBOX_HTTPS_INVALID,
102 }; 102 };
103 DCHECK(arraysize(icon_ids) == NUM_SECURITY_LEVELS); 103 DCHECK(arraysize(icon_ids) == NUM_SECURITY_LEVELS);
104 return icon_ids[GetSecurityLevel()]; 104 return icon_ids[GetSecurityLevel()];
105 } 105 }
106 106
107 void ToolbarModel::GetIconHoverText(std::wstring* text) const { 107 void ToolbarModel::GetIconHoverText(std::wstring* text) const {
108 DCHECK(text); 108 DCHECK(text);
109 text->clear(); 109 text->clear();
110 110
111 switch (GetSecurityLevel()) { 111 switch (GetSecurityLevel()) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 *text = errors[0].short_description(); 197 *text = errors[0].short_description();
198 } else { 198 } else {
199 // Multiple errors. 199 // Multiple errors.
200 *text = l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS); 200 *text = l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS);
201 for (size_t i = 0; i < errors.size(); ++i) { 201 for (size_t i = 0; i < errors.size(); ++i) {
202 text->append(L"\n"); 202 text->append(L"\n");
203 text->append(errors[i].short_description()); 203 text->append(errors[i].short_description());
204 } 204 }
205 } 205 }
206 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/theme_resources_util_unittest.cc ('k') | chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698