Commit 3eb6408e authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Resolve settings presubmit errors

Fix some of the more trivial presubmit warnings and  errors in the
preferences package. This will reduce the number of failures we'll need
to bypass in the upcoming package renaming.

Bug: 1027271
Change-Id: I5bda8192c91158d281f214a4d91e907f058a24d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1935716Reviewed-by: default avatarGang Wu <gangwu@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719390}
parent 1044617e
...@@ -113,8 +113,9 @@ public class PreferenceUtils { ...@@ -113,8 +113,9 @@ public class PreferenceUtils {
*/ */
private static boolean isOverflowMenuButton(View button, ActionMenuView parentMenu) { private static boolean isOverflowMenuButton(View button, ActionMenuView parentMenu) {
if (button == null) return false; if (button == null) return false;
if (!(button instanceof ImageView)) if (!(button instanceof ImageView)) {
return false; // Normal items are usually TextView or LinearLayouts. return false; // Normal items are usually TextView or LinearLayouts.
}
ImageView imageButton = (ImageView) button; ImageView imageButton = (ImageView) button;
return imageButton.getDrawable() == parentMenu.getOverflowIcon(); return imageButton.getDrawable() == parentMenu.getOverflowIcon();
} }
......
...@@ -22,8 +22,8 @@ import org.chromium.chrome.browser.widget.prefeditor.EditorObserverForTest; ...@@ -22,8 +22,8 @@ import org.chromium.chrome.browser.widget.prefeditor.EditorObserverForTest;
* Launches the UI to edit, create or delete an Autofill profile entry. * Launches the UI to edit, create or delete an Autofill profile entry.
*/ */
public class AutofillProfileEditorPreference extends Preference { public class AutofillProfileEditorPreference extends Preference {
final private Activity mActivity; private final Activity mActivity;
final private EditorObserverForTest mObserverForTest; private final EditorObserverForTest mObserverForTest;
private EditorDialog mEditorDialog; private EditorDialog mEditorDialog;
private AutofillAddress mAutofillAddress; private AutofillAddress mAutofillAddress;
private String mGUID; private String mGUID;
......
...@@ -23,7 +23,7 @@ public class BandwidthType { ...@@ -23,7 +23,7 @@ public class BandwidthType {
int NUM_ENTRIES = 3; int NUM_ENTRIES = 3;
} }
private final static String[] TITLES = { private static final String[] TITLES = {
"never_prefetch", "prefetch_on_wifi", "always_prefetch"}; "never_prefetch", "prefetch_on_wifi", "always_prefetch"};
/** /**
......
...@@ -81,9 +81,10 @@ public class ClearBrowsingDataFetcher ...@@ -81,9 +81,10 @@ public class ClearBrowsingDataFetcher
* shown yet. * shown yet.
*/ */
public void requestInfoAboutOtherFormsOfBrowsingHistory() { public void requestInfoAboutOtherFormsOfBrowsingHistory() {
if (!OtherFormsOfHistoryDialogFragment.wasDialogShown()) if (!OtherFormsOfHistoryDialogFragment.wasDialogShown()) {
BrowsingDataBridge.getInstance().requestInfoAboutOtherFormsOfBrowsingHistory(this); BrowsingDataBridge.getInstance().requestInfoAboutOtherFormsOfBrowsingHistory(this);
} }
}
/** /**
* @return The maximum number of important sites to show. * @return The maximum number of important sites to show.
......
...@@ -17,7 +17,7 @@ import androidx.annotation.Nullable; ...@@ -17,7 +17,7 @@ import androidx.annotation.Nullable;
*/ */
public class ContentSetting { public class ContentSetting {
// Indexed by {@link ContentSettingValues}. // Indexed by {@link ContentSettingValues}.
private final static String[] STRING_VALUES = { private static final String[] STRING_VALUES = {
"DEFAULT", // ContentSettingValues.DEFAULT "DEFAULT", // ContentSettingValues.DEFAULT
"ALLOW", // ContentSettingValues.ALLOW "ALLOW", // ContentSettingValues.ALLOW
"BLOCK", // ContentSettingValues.BLOCK "BLOCK", // ContentSettingValues.BLOCK
......
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