Commit e03b63ab authored by Daniel Rubery's avatar Daniel Rubery Committed by Chromium LUCI CQ

Remove base::Unretained usage in PasswordProtectionRequest

This usage was safe, since if the PasswordProtectionRequestion was
destroyed, |url_loader_| would be destroyed as well and not call the
callback. But the usage should be either documented with that reasoning
or removed, and we already have WeakPtrs set up for the
PasswordProtectionRequest.

Change-Id: I30f2f5fc5d3383f942d0ad3dc01584c69c25ed25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612027
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Auto-Submit: Daniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarXinghui Lu <xinghuilu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840409}
parent e9f79cfe
......@@ -540,7 +540,7 @@ void PasswordProtectionRequest::SendRequest() {
url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
password_protection_service_->url_loader_factory().get(),
base::BindOnce(&PasswordProtectionRequest::OnURLLoaderComplete,
base::Unretained(this)));
GetWeakPtr()));
}
void PasswordProtectionRequest::StartTimeout() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment