Commit 146b111f authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Update SadTab to use incognito profile when called incognito.

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

This CL updates SadTab 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: I6c5b85187f627348e2dadbba8eaa3a18d02ddb94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062972Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743030}
parent dc0d8b03
...@@ -23,7 +23,6 @@ import org.chromium.base.UserData; ...@@ -23,7 +23,6 @@ import org.chromium.base.UserData;
import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordHistogram;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback; import org.chromium.chrome.browser.help.HelpAndFeedback;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.ui_metrics.SadTabEvent; import org.chromium.components.ui_metrics.SadTabEvent;
import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.ui.text.NoUnderlineClickableSpan; import org.chromium.ui.text.NoUnderlineClickableSpan;
...@@ -91,8 +90,7 @@ public class SadTab extends EmptyTabObserver implements UserData { ...@@ -91,8 +90,7 @@ public class SadTab extends EmptyTabObserver implements UserData {
Activity activity = mTab.getWindowAndroid().getActivity().get(); Activity activity = mTab.getWindowAndroid().getActivity().get();
assert activity != null; assert activity != null;
HelpAndFeedback.getInstance().show(activity, HelpAndFeedback.getInstance().show(activity,
activity.getString(R.string.help_context_sad_tab), activity.getString(R.string.help_context_sad_tab), mTab.getProfile(), null);
Profile.getLastUsedProfile(), null);
} }
}; };
......
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