Commit 8c70e048 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Remove unnecessary mStorageInfoCallbacksLeft in Website.java

Change-Id: I4b309c8a1538d0e65761b283410176cfbcd60dc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362612
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: default avatarAndy Paicu <andypaicu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799605}
parent 6d3e7bf2
......@@ -41,7 +41,6 @@ public final class Website implements Serializable {
private LocalStorageInfo mLocalStorageInfo;
private final List<StorageInfo> mStorageInfo = new ArrayList<>();
private int mStorageInfoCallbacksLeft;
// The collection of chooser-based permissions (e.g. USB device access) granted to this site.
// Each entry declares its own ContentSettingsType and so depending on how this object was
......@@ -265,9 +264,9 @@ public final class Website implements Serializable {
BrowserContextHandle browserContextHandle, final StoredDataClearedCallback callback) {
// Wait for callbacks from each mStorageInfo and another callback from
// mLocalStorageInfo.
mStorageInfoCallbacksLeft = mStorageInfo.size() + 1;
int[] storageInfoCallbacksLeft = {mStorageInfo.size() + 1};
StorageInfoClearedCallback clearedCallback = () -> {
if (--mStorageInfoCallbacksLeft == 0) callback.onStoredDataCleared();
if (--storageInfoCallbacksLeft[0] == 0) callback.onStoredDataCleared();
};
if (mLocalStorageInfo != null) {
mLocalStorageInfo.clear(browserContextHandle, clearedCallback);
......
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