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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_impl.h" 5 #include "chrome/browser/ui/toolbar/toolbar_model_impl.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/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return icon_ids[GetSecurityLevel()]; 167 return icon_ids[GetSecurityLevel()];
168 } 168 }
169 169
170 string16 ToolbarModelImpl::GetEVCertName() const { 170 string16 ToolbarModelImpl::GetEVCertName() const {
171 DCHECK_EQ(GetSecurityLevel(), EV_SECURE); 171 DCHECK_EQ(GetSecurityLevel(), EV_SECURE);
172 scoped_refptr<net::X509Certificate> cert; 172 scoped_refptr<net::X509Certificate> cert;
173 // Note: Navigation controller and active entry are guaranteed non-NULL or 173 // Note: Navigation controller and active entry are guaranteed non-NULL or
174 // the security level would be NONE. 174 // the security level would be NONE.
175 content::CertStore::GetInstance()->RetrieveCert( 175 content::CertStore::GetInstance()->RetrieveCert(
176 GetNavigationController()->GetVisibleEntry()->GetSSL().cert_id, &cert); 176 GetNavigationController()->GetVisibleEntry()->GetSSL().cert_id, &cert);
177 return GetEVCertName(*cert); 177 return GetEVCertName(*cert.get());
178 } 178 }
179 179
180 // static 180 // static
181 string16 ToolbarModelImpl::GetEVCertName(const net::X509Certificate& cert) { 181 string16 ToolbarModelImpl::GetEVCertName(const net::X509Certificate& cert) {
182 // EV are required to have an organization name and country. 182 // EV are required to have an organization name and country.
183 if (cert.subject().organization_names.empty() || 183 if (cert.subject().organization_names.empty() ||
184 cert.subject().country_name.empty()) { 184 cert.subject().country_name.empty()) {
185 NOTREACHED(); 185 NOTREACHED();
186 return string16(); 186 return string16();
187 } 187 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 template_url->ExtractSearchTermsFromURL(url, &result); 228 template_url->ExtractSearchTermsFromURL(url, &result);
229 return result; 229 return result;
230 } 230 }
231 231
232 Profile* ToolbarModelImpl::GetProfile() const { 232 Profile* ToolbarModelImpl::GetProfile() const {
233 NavigationController* navigation_controller = GetNavigationController(); 233 NavigationController* navigation_controller = GetNavigationController();
234 return navigation_controller ? 234 return navigation_controller ?
235 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) : 235 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) :
236 NULL; 236 NULL;
237 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/action_box_button_controller.cc ('k') | chrome/browser/ui/website_settings/website_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698