Commit 14cd370a authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW: fix lint issues in WebView services

No change to logic. This exposes some @VisibleForTesting methods which
WebView services need to access.

Bug: 1107950
Test: autoninja -C out/Default monochrome_public_apk
Change-Id: I8f6d3c6d0b091db79c3b531e87fd7b642a06399e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2313836Reviewed-by: default avatarRobbie McElrath <rmcelrath@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarHazem Ashmawy <hazems@chromium.org>
Commit-Queue: Hazem Ashmawy <hazems@chromium.org>
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791240}
parent 4f3c37cd
...@@ -56,7 +56,6 @@ public class AwMinidumpUploaderDelegate implements MinidumpUploaderDelegate { ...@@ -56,7 +56,6 @@ public class AwMinidumpUploaderDelegate implements MinidumpUploaderDelegate {
mSamplingDelegate = samplingDelegate; mSamplingDelegate = samplingDelegate;
} }
@VisibleForTesting
public AwMinidumpUploaderDelegate() { public AwMinidumpUploaderDelegate() {
this(new SamplingDelegate() { this(new SamplingDelegate() {
private Random mRandom = new Random(); private Random mRandom = new Random();
......
...@@ -26,7 +26,6 @@ import java.io.FileOutputStream; ...@@ -26,7 +26,6 @@ import java.io.FileOutputStream;
* concurrent access to the seed by serializing all operations onto mSeedThread. * concurrent access to the seed by serializing all operations onto mSeedThread.
* VariationsSeedHolder is not meant to be used outside the variations service. * VariationsSeedHolder is not meant to be used outside the variations service.
*/ */
@VisibleForTesting
public class VariationsSeedHolder { public class VariationsSeedHolder {
private static final String TAG = "VariationsSeedHolder"; private static final String TAG = "VariationsSeedHolder";
...@@ -136,12 +135,10 @@ public class VariationsSeedHolder { ...@@ -136,12 +135,10 @@ public class VariationsSeedHolder {
return sInstance; return sInstance;
} }
@VisibleForTesting
public void writeSeedIfNewer(ParcelFileDescriptor destination, long date) { public void writeSeedIfNewer(ParcelFileDescriptor destination, long date) {
mSeedHandler.post(new SeedWriter(destination, date)); mSeedHandler.post(new SeedWriter(destination, date));
} }
@VisibleForTesting
public void updateSeed(SeedInfo newSeed, Runnable onFinished) { public void updateSeed(SeedInfo newSeed, Runnable onFinished) {
mSeedHandler.post(new SeedUpdater(newSeed, onFinished)); mSeedHandler.post(new SeedUpdater(newSeed, onFinished));
} }
......
...@@ -2062,61 +2062,6 @@ ...@@ -2062,61 +2062,6 @@
column="28"/> column="28"/>
</issue> </issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" return new MinidumpUploadJobImpl(new AwMinidumpUploaderDelegate());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java"
line="20"
column="16"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" return new MinidumpUploadJobImpl(new AwMinidumpUploaderDelegate());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java"
line="20"
column="42"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().updateSeed(fetchInfo.seedInfo,"
errorLine2=" ~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java"
line="194"
column="42"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().updateSeed(fetchInfo.seedInfo,"
errorLine2=" ~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java"
line="194"
column="56"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().updateSeed(fetchInfo.seedInfo,"
errorLine2=" ~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java"
line="194"
column="56"/>
</issue>
<issue <issue
id="VisibleForTests" id="VisibleForTests"
message="This method should only be accessed from tests or within private scope" message="This method should only be accessed from tests or within private scope"
...@@ -3459,17 +3404,6 @@ ...@@ -3459,17 +3404,6 @@
column="25"/> column="25"/>
</issue> </issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" return new MinidumpUploadJobImpl(new ChromeMinidumpUploaderDelegate(this, permissions));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="chrome/android/java/src/org/chromium/chrome/browser/crash/ChromeMinidumpUploadJobService.java"
line="21"
column="16"/>
</issue>
<issue <issue
id="VisibleForTests" id="VisibleForTests"
message="This method should only be accessed from tests or within private scope" message="This method should only be accessed from tests or within private scope"
...@@ -6715,39 +6649,6 @@ ...@@ -6715,39 +6649,6 @@
column="45"/> column="45"/>
</issue> </issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate);"
errorLine2=" ~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java"
line="34"
column="34"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate);"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java"
line="34"
column="48"/>
</issue>
<issue
id="VisibleForTests"
message="This method should only be accessed from tests or within private scope"
errorLine1=" VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate);"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java"
line="34"
column="48"/>
</issue>
<issue <issue
id="VisibleForTests" id="VisibleForTests"
message="This method should only be accessed from tests or within private scope" message="This method should only be accessed from tests or within private scope"
......
...@@ -43,7 +43,6 @@ public class MinidumpUploadJobImpl implements MinidumpUploadJob { ...@@ -43,7 +43,6 @@ public class MinidumpUploadJobImpl implements MinidumpUploadJob {
@VisibleForTesting @VisibleForTesting
public static final int MAX_UPLOAD_TRIES_ALLOWED = 3; public static final int MAX_UPLOAD_TRIES_ALLOWED = 3;
@VisibleForTesting
public MinidumpUploadJobImpl(MinidumpUploaderDelegate delegate) { public MinidumpUploadJobImpl(MinidumpUploaderDelegate delegate) {
mDelegate = delegate; mDelegate = delegate;
} }
......
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