summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 22:03:00 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 22:03:00 +0000
commit71e4573a9ff241416f5cfc375dabec8b72c85e3c (patch)
treed6e52e21cd940aef48dc37e9094ba9d66bd6431f /chrome
parentb360895e1e4ba2db735f82d85563a631e1cc0c5b (diff)
downloadchromium_src-71e4573a9ff241416f5cfc375dabec8b72c85e3c.zip
chromium_src-71e4573a9ff241416f5cfc375dabec8b72c85e3c.tar.gz
chromium_src-71e4573a9ff241416f5cfc375dabec8b72c85e3c.tar.bz2
Changes the UI for HTTP/FTP auth challenges to include the server's port. So instead of "www.foo.com" it will say "www.foo.com:80". We need to include the port number since otherwise it can be ambiguous what the actual target server is.
This change also introduces utility function "GetHostAnd[Optional]Port()" to help with forming <host> [":" <port>] strings. BUG=12073 Review URL: http://codereview.chromium.org/112041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/login_prompt.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/login_prompt.cc b/chrome/browser/login_prompt.cc
index 49b5da9..002e017 100644
--- a/chrome/browser/login_prompt.cc
+++ b/chrome/browser/login_prompt.cc
@@ -54,7 +54,7 @@ std::string GetSignonRealm(const GURL& url,
const net::AuthChallengeInfo& auth_info) {
std::string signon_realm;
if (auth_info.is_proxy) {
- signon_realm = WideToASCII(auth_info.host);
+ signon_realm = WideToASCII(auth_info.host_and_port);
signon_realm.append("/");
} else {
// Take scheme, host, and port from the url.
@@ -344,9 +344,9 @@ class LoginDialogTask : public Task {
wstring explanation = auth_info_->realm.empty() ?
l10n_util::GetStringF(IDS_LOGIN_DIALOG_DESCRIPTION_NO_REALM,
- auth_info_->host) :
+ auth_info_->host_and_port) :
l10n_util::GetStringF(IDS_LOGIN_DIALOG_DESCRIPTION,
- auth_info_->host,
+ auth_info_->host_and_port,
auth_info_->realm);
LoginView* view = new LoginView(explanation);