Commit 511de1f3 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Replace deprecated getLastUsedProfile function in

DataReductionPreferenceFragment.

|Profile#getLastUsedProfile| is deprecated and replaced with
|Profile#getLastUsedRegularProfile|. This CL updates
DataReductionPreferenceFragment class.

Since settings is considered as always running on regular mode,
it is safe to use regular profile even called in incognito mode.
For this reason, there is no need to make change on code behavior to
act differently for each profile. Therefore, it is safe to leave
behavior as-is today.

Note: This change is only code clean-up, does not change any behavior.

Bug: 1041781
Change-Id: I0585683c1d6d844b2749e36095d941f02f19d237
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066908Reviewed-by: default avatarRyan Sturm <ryansturm@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744585}
parent ab433eb9
......@@ -111,8 +111,8 @@ public class DataReductionPreferenceFragment extends PreferenceFragmentCompat {
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.menu_id_targeted_help) {
HelpAndFeedback.getInstance().show(getActivity(),
getString(R.string.help_context_data_reduction), Profile.getLastUsedProfile(),
null);
getString(R.string.help_context_data_reduction),
Profile.getLastUsedRegularProfile(), null);
return true;
}
return false;
......
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