summaryrefslogtreecommitdiffstats
path: root/src/core/login_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/login_delegate_qt.cpp')
-rw-r--r--src/core/login_delegate_qt.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/login_delegate_qt.cpp b/src/core/login_delegate_qt.cpp
index f63252112..1b9c22191 100644
--- a/src/core/login_delegate_qt.cpp
+++ b/src/core/login_delegate_qt.cpp
@@ -48,9 +48,9 @@
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/resource_dispatcher_host.h"
-#include "content/public/browser/resource_request_info.h"
#include "extensions/buildflags/buildflags.h"
+#include "services/network/public/cpp/features.h"
+
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/info_map.h"
#include "extensions/common/extension.h"
@@ -82,7 +82,7 @@ LoginDelegateQt::LoginDelegateQt(const net::AuthChallengeInfo &authInfo,
, m_auth_required_callback(std::move(auth_required_callback))
, m_weakFactory(this)
{
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, { content::BrowserThread::UI },
base::BindOnce(&LoginDelegateQt::triggerDialog, m_weakFactory.GetWeakPtr()));
}
@@ -153,7 +153,9 @@ void LoginDelegateQt::sendAuthToRequester(bool success, const QString &user, con
std::move(m_auth_required_callback).Run(base::nullopt);
}
- destroy();
+ // With network service the auth callback has already deleted us.
+ if (!base::FeatureList::IsEnabled(network::features::kNetworkService))
+ destroy();
}
void LoginDelegateQt::destroy()