| 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_prompt.h" | 5 #include "chrome/browser/ui/login/login_prompt.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 ResetLoginHandlerForRequest(request_); | 372 ResetLoginHandlerForRequest(request_); |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 // Closes the view_contents from the UI loop. | 376 // Closes the view_contents from the UI loop. |
| 377 void LoginHandler::CloseContentsDeferred() { | 377 void LoginHandler::CloseContentsDeferred() { |
| 378 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 378 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 379 | 379 |
| 380 // The hosting ConstrainedWindow may have been freed. | 380 // The hosting ConstrainedWindow may have been freed. |
| 381 if (dialog_) | 381 if (dialog_) |
| 382 dialog_->CloseConstrainedWindow(); | 382 dialog_->CloseWebContentsModalDialog(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Helper to create a PasswordForm and stuff it into a vector as input | 385 // Helper to create a PasswordForm and stuff it into a vector as input |
| 386 // for PasswordManager::PasswordFormsParsed, the hook into PasswordManager. | 386 // for PasswordManager::PasswordFormsParsed, the hook into PasswordManager. |
| 387 void MakeInputForPasswordManager( | 387 void MakeInputForPasswordManager( |
| 388 const GURL& request_url, | 388 const GURL& request_url, |
| 389 net::AuthChallengeInfo* auth_info, | 389 net::AuthChallengeInfo* auth_info, |
| 390 LoginHandler* handler, | 390 LoginHandler* handler, |
| 391 std::vector<PasswordForm>* password_manager_input) { | 391 std::vector<PasswordForm>* password_manager_input) { |
| 392 PasswordForm dialog_form; | 392 PasswordForm dialog_form; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 467 |
| 468 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, | 468 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, |
| 469 net::URLRequest* request) { | 469 net::URLRequest* request) { |
| 470 LoginHandler* handler = LoginHandler::Create(auth_info, request); | 470 LoginHandler* handler = LoginHandler::Create(auth_info, request); |
| 471 BrowserThread::PostTask( | 471 BrowserThread::PostTask( |
| 472 BrowserThread::UI, FROM_HERE, | 472 BrowserThread::UI, FROM_HERE, |
| 473 base::Bind(&LoginDialogCallback, request->url(), | 473 base::Bind(&LoginDialogCallback, request->url(), |
| 474 make_scoped_refptr(auth_info), make_scoped_refptr(handler))); | 474 make_scoped_refptr(auth_info), make_scoped_refptr(handler))); |
| 475 return handler; | 475 return handler; |
| 476 } | 476 } |
| OLD | NEW |