Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1091)

Unified Diff: content/shell/shell_login_dialog.cc

Issue 10069054: RefCounted types should not have public destructors, content/ remaining bits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to Trunk Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_login_dialog.h ('k') | content/test/mock_download_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/shell/shell_login_dialog.h ('k') | content/test/mock_download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698