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

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

Issue 10951023: Update page icon in the omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/toolbar/toolbar_model.h" 5 #include "chrome/browser/ui/toolbar/toolbar_model.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/autocomplete_input.h" 8 #include "chrome/browser/autocomplete/autocomplete_input.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_util.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return SECURE; 146 return SECURE;
147 147
148 default: 148 default:
149 NOTREACHED(); 149 NOTREACHED();
150 return NONE; 150 return NONE;
151 } 151 }
152 } 152 }
153 153
154 int ToolbarModel::GetIcon() const { 154 int ToolbarModel::GetIcon() const {
155 static int icon_ids[NUM_SECURITY_LEVELS] = { 155 static int icon_ids[NUM_SECURITY_LEVELS] = {
156 IDR_OMNIBOX_HTTP, 156 IDR_LOCATION_BAR_HTTP,
157 IDR_OMNIBOX_HTTPS_VALID, 157 IDR_OMNIBOX_HTTPS_VALID,
158 IDR_OMNIBOX_HTTPS_VALID, 158 IDR_OMNIBOX_HTTPS_VALID,
159 IDR_OMNIBOX_HTTPS_WARNING, 159 IDR_OMNIBOX_HTTPS_WARNING,
160 IDR_OMNIBOX_HTTPS_INVALID, 160 IDR_OMNIBOX_HTTPS_INVALID,
161 }; 161 };
162 DCHECK(arraysize(icon_ids) == NUM_SECURITY_LEVELS); 162 DCHECK(arraysize(icon_ids) == NUM_SECURITY_LEVELS);
163 return icon_ids[GetSecurityLevel()]; 163 return icon_ids[GetSecurityLevel()];
164 } 164 }
165 165
166 string16 ToolbarModel::GetEVCertName() const { 166 string16 ToolbarModel::GetEVCertName() const {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 return string16(); 208 return string16();
209 } 209 }
210 210
211 Profile* ToolbarModel::GetProfile() const { 211 Profile* ToolbarModel::GetProfile() const {
212 NavigationController* navigation_controller = GetNavigationController(); 212 NavigationController* navigation_controller = GetNavigationController();
213 return navigation_controller ? 213 return navigation_controller ?
214 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) : 214 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) :
215 NULL; 215 NULL;
216 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698