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

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

Issue 6044006: Remove wstring from l10n_util. Part 3.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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/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.h" 8 #include "chrome/browser/autocomplete/autocomplete.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit.h"
10 #include "chrome/browser/cert_store.h" 10 #include "chrome/browser/cert_store.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return icon_ids[GetSecurityLevel()]; 110 return icon_ids[GetSecurityLevel()];
111 } 111 }
112 112
113 std::wstring ToolbarModel::GetEVCertName() const { 113 std::wstring ToolbarModel::GetEVCertName() const {
114 DCHECK_EQ(GetSecurityLevel(), EV_SECURE); 114 DCHECK_EQ(GetSecurityLevel(), EV_SECURE);
115 scoped_refptr<net::X509Certificate> cert; 115 scoped_refptr<net::X509Certificate> cert;
116 // Note: Navigation controller and active entry are guaranteed non-NULL or 116 // Note: Navigation controller and active entry are guaranteed non-NULL or
117 // the security level would be NONE. 117 // the security level would be NONE.
118 CertStore::GetInstance()->RetrieveCert( 118 CertStore::GetInstance()->RetrieveCert(
119 GetNavigationController()->GetActiveEntry()->ssl().cert_id(), &cert); 119 GetNavigationController()->GetActiveEntry()->ssl().cert_id(), &cert);
120 return SSLManager::GetEVCertName(*cert); 120 return UTF16ToWideHack(SSLManager::GetEVCertName(*cert));
121 } 121 }
122 122
123 NavigationController* ToolbarModel::GetNavigationController() const { 123 NavigationController* ToolbarModel::GetNavigationController() const {
124 // This |current_tab| can be NULL during the initialization of the 124 // This |current_tab| can be NULL during the initialization of the
125 // toolbar during window creation (i.e. before any tabs have been added 125 // toolbar during window creation (i.e. before any tabs have been added
126 // to the window). 126 // to the window).
127 TabContents* current_tab = browser_->GetSelectedTabContents(); 127 TabContents* current_tab = browser_->GetSelectedTabContents();
128 return current_tab ? &current_tab->controller() : NULL; 128 return current_tab ? &current_tab->controller() : NULL;
129 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698