Commit 1181e430 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Update CredentialLeakDialogBridge to use incognito profile when called

incognito.

This CL updates the profile passing to HelpAndFeedback activity from
CredentialLeakDialogBridge. Currently, it is always regular profile,
however it is not safe because of possible data leakage from incognito
to regular profile.

This CL updates CredentialLeakDialogBridge to receive the current
profile (i.e., regular or off-the-record profile) of current tab and
pass it to HelpAndFeedback activity.

Bug: 1041781
Change-Id: Ia36d7d604d41f1dff72ed7acd4ac6dfcdafdb3bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063020Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarIoana Pandele <ioanap@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742699}
parent b019d922
...@@ -9,6 +9,7 @@ import org.chromium.chrome.R; ...@@ -9,6 +9,7 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.help.HelpAndFeedback; import org.chromium.chrome.browser.help.HelpAndFeedback;
import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.TabImpl;
import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.base.WindowAndroid;
import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.DialogDismissalCause;
...@@ -76,9 +77,11 @@ public class CredentialLeakDialogBridge { ...@@ -76,9 +77,11 @@ public class CredentialLeakDialogBridge {
private void showHelpArticle() { private void showHelpArticle() {
if (mActivity.get() == null) return; if (mActivity.get() == null) return;
Profile profile = ((TabImpl) mActivity.get().getActivityTabProvider().get()).getProfile();
HelpAndFeedback.getInstance().show(mActivity.get(), HelpAndFeedback.getInstance().show(mActivity.get(),
mActivity.get().getString(R.string.help_context_password_leak_detection), mActivity.get().getString(R.string.help_context_password_leak_detection), profile,
Profile.getLastUsedProfile(), null); null);
} }
@NativeMethods @NativeMethods
......
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