From 89f4148d6386ee7d0cf69316492e5ee88f84fd76 Mon Sep 17 00:00:00 2001 From: Yue Zhang Date: Mon, 27 Jul 2020 20:55:06 +0000 Subject: [PATCH] Fix lint issues in tab_ui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Suppress a lint warning that is expected. * For methods whose visibility is relaxed not only for the reason of testing, remove the @VisibleForTesting annotation. Bug: 1108022 Change-Id: I3f8004e3b27cfbbc82a8061c19e57e1662a0691a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315926 Reviewed-by: Wei-Yin Chen (陳威尹) Reviewed-by: Ted Choc Commit-Queue: Yue Zhang Cr-Commit-Position: refs/heads/master@{#791974} --- build/android/lint/baseline.xml | 121 ------------------ .../tab_management/IphMessageService.java | 3 + .../browser/tabmodel/TabPersistentStore.java | 1 - .../TabbedModeTabPersistencePolicy.java | 1 - .../tasks/ConditionalTabStripUtils.java | 4 - .../browser/NavigationController.java | 2 - 6 files changed, 3 insertions(+), 129 deletions(-) diff --git a/build/android/lint/baseline.xml b/build/android/lint/baseline.xml index 72714764953c3a..146dc6faed66c4 100644 --- a/build/android/lint/baseline.xml +++ b/build/android/lint/baseline.xml @@ -199,17 +199,6 @@ column="17"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - getStateToBeMergedFileNames() { * @param selectorIndex The index that represents which state file to pull and save state to. * @return The name of the state file. */ - @VisibleForTesting public static String getStateFileName(int selectorIndex) { return TabPersistentStore.getStateFileName(Integer.toString(selectorIndex)); } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java index 8102adecf9db4d..66561534f48ecf 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java @@ -171,7 +171,6 @@ private static void recordUserStatusEnums(@UserStatus int userStatus) { * * @param featureStatus the target {@link FeatureStatus} to set. */ - @VisibleForTesting public static void setFeatureStatus(@FeatureStatus int featureStatus) { SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance(); sharedPreferencesManager.writeInt(FEATURE_STATUS, featureStatus); @@ -219,7 +218,6 @@ public static int getContinuousDismissCount() { * * @param count the updated count to save into SharedPreference. */ - @VisibleForTesting public static void setContinuousDismissCount(int count) { SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance(); sharedPreferencesManager.writeInt(CONTINUOUS_DISMISS_COUNTER, count); @@ -229,7 +227,6 @@ public static void setContinuousDismissCount(int count) { * Get the boolean indicator that indicates whether this user has opt-outed the conditional tab * strip feature from SharedPreference. */ - @VisibleForTesting public static boolean getOptOutIndicator() { SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance(); return sharedPreferencesManager.readBoolean(OPT_OUT_INDICATOR, false); @@ -241,7 +238,6 @@ public static boolean getOptOutIndicator() { * * @param isOptOut the boolean indicator to save into SharedPreference. */ - @VisibleForTesting public static void setOptOutIndicator(boolean isOptOut) { SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance(); sharedPreferencesManager.writeBoolean(OPT_OUT_INDICATOR, isOptOut); diff --git a/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java b/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java index 63456a35f430c7..68c1f0f717c5b3 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java @@ -5,7 +5,6 @@ package org.chromium.content_public.browser; import androidx.annotation.Nullable; -import androidx.annotation.VisibleForTesting; /** * The NavigationController Java wrapper to allow communicating with the native @@ -144,7 +143,6 @@ public interface NavigationController { * @param index Index to retrieve the NavigationEntry for. * @return Entry containing info about the navigation, null if the index is out of bounds. */ - @VisibleForTesting public NavigationEntry getEntryAtIndex(int index); /**