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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.h ('k') | net/base/auth.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/toolbar_model.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index b8091a3aa1d6d3531805af9ab4ff043f51b72380..472a8eb9a58b6f8108dbc3f7f75832d0d1059780 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -122,6 +122,29 @@ std::wstring ToolbarModel::GetEVCertName() const {
return UTF16ToWideHack(SSLManager::GetEVCertName(*cert));
}
+string16 ToolbarModel::GetSiteName() const {
+ DCHECK(GetNavigationController());
+ DCHECK(GetNavigationController()->GetActiveEntry());
+ return UTF8ToUTF16(net::GetHostAndPort(
+ GetNavigationController()->GetActiveEntry()->url()));
+}
+
+string16 ToolbarModel::GetSiteAccount() const {
+ if (!GetNavigationController() ||
+ !GetNavigationController()->GetActiveEntry())
+ return string16();
+
+ // TODO(sqs): find a better way of indicating "Logging in..." than just
+ // returning a string here
+ NavigationEntry* entry = GetNavigationController()->GetActiveEntry();
+ if (!entry->ssl().tls_username().empty())
+ return entry->ssl().tls_username();
+ else if (0) // TODO(sqs): find if logging in
+ return ASCIIToUTF16("Logging in...");
+ else
+ return string16();
+}
+
NavigationController* ToolbarModel::GetNavigationController() const {
// This |current_tab| can be NULL during the initialization of the
// toolbar during window creation (i.e. before any tabs have been added
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.h ('k') | net/base/auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698