Commit 39271788 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Remove GetAssociatedWebContents() calls from passwordsPrivate

The ExtensionFunction::GetAssociatedWebContentsDeprecated() method is
unpredictable and can return surprising values in certain circumstances.
It is deprecated and should be removed to ensure that callers are using
the WebContents they expect.

Update the passwordsPrivate API to use GetSenderWebContents() instead.

Bug: 461394
Change-Id: I24b75989786d06aa14a64f403d134e293eb9902a
Reviewed-on: https://chromium-review.googlesource.com/1040530Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555708}
parent 44838649
...@@ -196,7 +196,7 @@ PasswordsPrivateExportPasswordsFunction::Run() { ...@@ -196,7 +196,7 @@ PasswordsPrivateExportPasswordsFunction::Run() {
base::BindOnce( base::BindOnce(
&PasswordsPrivateExportPasswordsFunction::ExportRequestCompleted, &PasswordsPrivateExportPasswordsFunction::ExportRequestCompleted,
this), this),
GetAssociatedWebContentsDeprecated()); GetSenderWebContents());
return RespondLater(); return RespondLater();
} }
......
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