| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/browser/tab_contents/tab_contents.h" | 22 #include "content/browser/tab_contents/tab_contents.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "net/base/auth.h" | 26 #include "net/base/auth.h" |
| 27 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
| 28 #include "net/url_request/url_request.h" | 28 #include "net/url_request/url_request.h" |
| 29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 30 #include "ui/base/text/text_elider.h" | 30 #include "ui/base/text/text_elider.h" |
| 31 | 31 |
| 32 using content::BrowserThread; |
| 32 using webkit_glue::PasswordForm; | 33 using webkit_glue::PasswordForm; |
| 33 | 34 |
| 34 class LoginHandlerImpl; | 35 class LoginHandlerImpl; |
| 35 | 36 |
| 36 // Helper to remove the ref from an net::URLRequest to the LoginHandler. | 37 // Helper to remove the ref from an net::URLRequest to the LoginHandler. |
| 37 // Should only be called from the IO thread, since it accesses an | 38 // Should only be called from the IO thread, since it accesses an |
| 38 // net::URLRequest. | 39 // net::URLRequest. |
| 39 void ResetLoginHandlerForRequest(net::URLRequest* request) { | 40 void ResetLoginHandlerForRequest(net::URLRequest* request) { |
| 40 ResourceDispatcherHostRequestInfo* info = | 41 ResourceDispatcherHostRequestInfo* info = |
| 41 ResourceDispatcherHost::InfoForRequest(request); | 42 ResourceDispatcherHost::InfoForRequest(request); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 // Public API | 491 // Public API |
| 491 | 492 |
| 492 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, | 493 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, |
| 493 net::URLRequest* request) { | 494 net::URLRequest* request) { |
| 494 LoginHandler* handler = LoginHandler::Create(auth_info, request); | 495 LoginHandler* handler = LoginHandler::Create(auth_info, request); |
| 495 BrowserThread::PostTask( | 496 BrowserThread::PostTask( |
| 496 BrowserThread::UI, FROM_HERE, new LoginDialogTask( | 497 BrowserThread::UI, FROM_HERE, new LoginDialogTask( |
| 497 request->url(), auth_info, handler)); | 498 request->url(), auth_info, handler)); |
| 498 return handler; | 499 return handler; |
| 499 } | 500 } |
| OLD | NEW |