| 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/login_prompt.h" | 5 #include "chrome/browser/login_prompt.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lock.h" | 9 #include "base/lock.h" |
| 10 #include "base/message_loop.h" | 10 #include "chrome/browser/chrome_thread.h" |
| 11 #include "chrome/browser/browser_process.h" | |
| 12 #include "chrome/browser/password_manager/password_manager.h" | 11 #include "chrome/browser/password_manager/password_manager.h" |
| 13 #include "chrome/browser/renderer_host/render_process_host.h" | 12 #include "chrome/browser/renderer_host/render_process_host.h" |
| 14 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 13 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 15 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 14 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 16 #include "chrome/browser/tab_contents/constrained_window.h" | 15 #include "chrome/browser/tab_contents/constrained_window.h" |
| 17 #include "chrome/browser/tab_contents/tab_contents.h" | 16 #include "chrome/browser/tab_contents/tab_contents.h" |
| 18 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 19 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 20 #include "net/base/auth.h" | 19 #include "net/base/auth.h" |
| 21 #include "net/url_request/url_request.h" | 20 #include "net/url_request/url_request.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // This is owned by the ResourceDispatcherHost that invoked us. | 133 // This is owned by the ResourceDispatcherHost that invoked us. |
| 135 LoginHandler* handler_; | 134 LoginHandler* handler_; |
| 136 | 135 |
| 137 DISALLOW_EVIL_CONSTRUCTORS(LoginDialogTask); | 136 DISALLOW_EVIL_CONSTRUCTORS(LoginDialogTask); |
| 138 }; | 137 }; |
| 139 | 138 |
| 140 // ---------------------------------------------------------------------------- | 139 // ---------------------------------------------------------------------------- |
| 141 // Public API | 140 // Public API |
| 142 | 141 |
| 143 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, | 142 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, |
| 144 URLRequest* request, | 143 URLRequest* request) { |
| 145 MessageLoop* ui_loop) { | 144 LoginHandler* handler = LoginHandler::Create(request); |
| 146 LoginHandler* handler = LoginHandler::Create(request, ui_loop); | 145 ChromeThread::PostTask( |
| 147 ui_loop->PostTask(FROM_HERE, new LoginDialogTask(auth_info, handler)); | 146 ChromeThread::UI, FROM_HERE, new LoginDialogTask(auth_info, handler)); |
| 148 return handler; | 147 return handler; |
| 149 } | 148 } |
| OLD | NEW |