| 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/login/login_handler.h" | 5 #include "chrome/browser/ui/login/login_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 *authority = l10n_util::GetStringFUTF16( | 512 *authority = l10n_util::GetStringFUTF16( |
| 513 IDS_LOGIN_DIALOG_AUTHORITY, | 513 IDS_LOGIN_DIALOG_AUTHORITY, |
| 514 url_formatter::FormatUrlForSecurityDisplay(request_url)); | 514 url_formatter::FormatUrlForSecurityDisplay(request_url)); |
| 515 authority_url = request_url; | 515 authority_url = request_url; |
| 516 } | 516 } |
| 517 | 517 |
| 518 if (!content::IsOriginSecure(authority_url)) { | 518 if (!content::IsOriginSecure(authority_url)) { |
| 519 // TODO(asanka): The string should be different for proxies and servers. | 519 // TODO(asanka): The string should be different for proxies and servers. |
| 520 // http://crbug.com/620756 | 520 // http://crbug.com/620756 |
| 521 *explanation = | 521 *explanation = |
| 522 l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_NON_SECURE_TRANSPORT); | 522 l10n_util::GetStringUTF16(IDS_PAGE_INFO_NON_SECURE_TRANSPORT); |
| 523 } else { | 523 } else { |
| 524 explanation->clear(); | 524 explanation->clear(); |
| 525 } | 525 } |
| 526 } | 526 } |
| 527 | 527 |
| 528 // static | 528 // static |
| 529 void LoginHandler::ShowLoginPrompt(const GURL& request_url, | 529 void LoginHandler::ShowLoginPrompt(const GURL& request_url, |
| 530 net::AuthChallengeInfo* auth_info, | 530 net::AuthChallengeInfo* auth_info, |
| 531 LoginHandler* handler) { | 531 LoginHandler* handler) { |
| 532 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 532 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 bool is_main_frame = | 662 bool is_main_frame = |
| 663 (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) != 0; | 663 (request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) != 0; |
| 664 LoginHandler* handler = LoginHandler::Create(auth_info, request); | 664 LoginHandler* handler = LoginHandler::Create(auth_info, request); |
| 665 BrowserThread::PostTask( | 665 BrowserThread::PostTask( |
| 666 BrowserThread::UI, FROM_HERE, | 666 BrowserThread::UI, FROM_HERE, |
| 667 base::Bind(&LoginHandler::LoginDialogCallback, request->url(), | 667 base::Bind(&LoginHandler::LoginDialogCallback, request->url(), |
| 668 base::RetainedRef(auth_info), base::RetainedRef(handler), | 668 base::RetainedRef(auth_info), base::RetainedRef(handler), |
| 669 is_main_frame)); | 669 is_main_frame)); |
| 670 return handler; | 670 return handler; |
| 671 } | 671 } |
| OLD | NEW |