| Index: content/shell/shell_login_dialog.cc
|
| diff --git a/content/shell/shell_login_dialog.cc b/content/shell/shell_login_dialog.cc
|
| index def2ba35c790c0f633d16b41eee8d748f0bdf270..27dee823d1fad6cf3763be62813e3cd4d0d1e405 100644
|
| --- a/content/shell/shell_login_dialog.cc
|
| +++ b/content/shell/shell_login_dialog.cc
|
| @@ -27,11 +27,6 @@ ShellLoginDialog::ShellLoginDialog(
|
| UTF8ToUTF16(auth_info->realm)));
|
| }
|
|
|
| -ShellLoginDialog::~ShellLoginDialog() {
|
| - // Cannot post any tasks here; this object is going away and cannot be
|
| - // referenced/dereferenced.
|
| -}
|
| -
|
| void ShellLoginDialog::OnRequestCancelled() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| BrowserThread::PostTask(
|
| @@ -39,6 +34,40 @@ void ShellLoginDialog::OnRequestCancelled() {
|
| base::Bind(&ShellLoginDialog::PlatformRequestCancelled, this));
|
| }
|
|
|
| +void ShellLoginDialog::UserAcceptedAuth(const string16& username,
|
| + const string16& password) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&ShellLoginDialog::SendAuthToRequester, this,
|
| + true, username, password));
|
| +}
|
| +
|
| +void ShellLoginDialog::UserCancelledAuth() {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&ShellLoginDialog::SendAuthToRequester, this,
|
| + false, string16(), string16()));
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&ShellLoginDialog::PlatformCleanUp, this));
|
| +}
|
| +
|
| +ShellLoginDialog::~ShellLoginDialog() {
|
| + // Cannot post any tasks here; this object is going away and cannot be
|
| + // referenced/dereferenced.
|
| +}
|
| +
|
| +#if !defined(OS_MACOSX)
|
| +// Bogus implementations for linking. They are never called because
|
| +// ResourceDispatcherHostDelegate::CreateLoginDelegate returns NULL.
|
| +// TODO: implement ShellLoginDialog for other platforms, drop this #if
|
| +void ShellLoginDialog::PlatformCreateDialog(const string16& message) {}
|
| +void ShellLoginDialog::PlatformCleanUp() {}
|
| +void ShellLoginDialog::PlatformRequestCancelled() {}
|
| +#endif
|
| +
|
| void ShellLoginDialog::PrepDialog(const string16& host,
|
| const string16& realm) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| @@ -60,26 +89,6 @@ void ShellLoginDialog::PrepDialog(const string16& host,
|
| PlatformCreateDialog(explanation);
|
| }
|
|
|
| -void ShellLoginDialog::UserAcceptedAuth(const string16& username,
|
| - const string16& password) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - BrowserThread::PostTask(
|
| - BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&ShellLoginDialog::SendAuthToRequester, this,
|
| - true, username, password));
|
| -}
|
| -
|
| -void ShellLoginDialog::UserCancelledAuth() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - BrowserThread::PostTask(
|
| - BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&ShellLoginDialog::SendAuthToRequester, this,
|
| - false, string16(), string16()));
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - base::Bind(&ShellLoginDialog::PlatformCleanUp, this));
|
| -}
|
| -
|
| void ShellLoginDialog::SendAuthToRequester(bool success,
|
| const string16& username,
|
| const string16& password) {
|
| @@ -95,13 +104,4 @@ void ShellLoginDialog::SendAuthToRequester(bool success,
|
| base::Bind(&ShellLoginDialog::PlatformCleanUp, this));
|
| }
|
|
|
| -#if !defined(OS_MACOSX)
|
| -// Bogus implementations for linking. They are never called because
|
| -// ResourceDispatcherHostDelegate::CreateLoginDelegate returns NULL.
|
| -// TODO: implement ShellLoginDialog for other platforms, drop this #if
|
| -void ShellLoginDialog::PlatformCreateDialog(const string16& message) {}
|
| -void ShellLoginDialog::PlatformCleanUp() {}
|
| -void ShellLoginDialog::PlatformRequestCancelled() {}
|
| -#endif
|
| -
|
| } // namespace content
|
|
|