OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_prompt.h" | 5 #include "chrome/browser/ui/login/login_prompt.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 391 |
392 // Tell the password manager to look for saved passwords. | 392 // Tell the password manager to look for saved passwords. |
393 TabContentsWrapper** wrapper = | 393 TabContentsWrapper** wrapper = |
394 TabContentsWrapper::property_accessor()->GetProperty( | 394 TabContentsWrapper::property_accessor()->GetProperty( |
395 parent_contents->property_bag()); | 395 parent_contents->property_bag()); |
396 if (!wrapper) | 396 if (!wrapper) |
397 return; | 397 return; |
398 PasswordManager* password_manager = (*wrapper)->GetPasswordManager(); | 398 PasswordManager* password_manager = (*wrapper)->GetPasswordManager(); |
399 std::vector<PasswordForm> v; | 399 std::vector<PasswordForm> v; |
400 MakeInputForPasswordManager(&v); | 400 MakeInputForPasswordManager(&v); |
401 password_manager->PasswordFormsFound(v); | 401 password_manager->OnPasswordFormsFound(v); |
402 handler_->SetPasswordManager(password_manager); | 402 handler_->SetPasswordManager(password_manager); |
403 | 403 |
404 string16 host_and_port_hack16 = WideToUTF16Hack(auth_info_->host_and_port); | 404 string16 host_and_port_hack16 = WideToUTF16Hack(auth_info_->host_and_port); |
405 string16 realm_hack16 = WideToUTF16Hack(auth_info_->realm); | 405 string16 realm_hack16 = WideToUTF16Hack(auth_info_->realm); |
406 string16 explanation = realm_hack16.empty() ? | 406 string16 explanation = realm_hack16.empty() ? |
407 l10n_util::GetStringFUTF16(IDS_LOGIN_DIALOG_DESCRIPTION_NO_REALM, | 407 l10n_util::GetStringFUTF16(IDS_LOGIN_DIALOG_DESCRIPTION_NO_REALM, |
408 host_and_port_hack16) : | 408 host_and_port_hack16) : |
409 l10n_util::GetStringFUTF16(IDS_LOGIN_DIALOG_DESCRIPTION, | 409 l10n_util::GetStringFUTF16(IDS_LOGIN_DIALOG_DESCRIPTION, |
410 host_and_port_hack16, | 410 host_and_port_hack16, |
411 realm_hack16); | 411 realm_hack16); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // Public API | 462 // Public API |
463 | 463 |
464 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, | 464 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, |
465 net::URLRequest* request) { | 465 net::URLRequest* request) { |
466 LoginHandler* handler = LoginHandler::Create(auth_info, request); | 466 LoginHandler* handler = LoginHandler::Create(auth_info, request); |
467 BrowserThread::PostTask( | 467 BrowserThread::PostTask( |
468 BrowserThread::UI, FROM_HERE, new LoginDialogTask( | 468 BrowserThread::UI, FROM_HERE, new LoginDialogTask( |
469 request->url(), auth_info, handler)); | 469 request->url(), auth_info, handler)); |
470 return handler; | 470 return handler; |
471 } | 471 } |
OLD | NEW |