OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |