Commit a3d52536 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Fix profile usages at AutoFetchNotifier and OfflineNotificationBT.

This CL removes TODO for profile usages at AutoFetchNotifier and
OfflineNotificationBackgroundTask, while adding a comment about profile.
Since both classes are only called by other classes of offline pages and
offline pages is only available in regular mode, those two are only
called during regular mode. Hence, it is correct to use always regular
profile there.

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

Bug: 1067314
Change-Id: I41e2191932379fe17e8c1930b0d270e50ce0f79b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225721
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Reviewed-by: default avatarScott Little <sclittle@chromium.org>
Reviewed-by: default avatarCarlos Knippschild <carlosk@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776454}
parent ef4297b7
......@@ -361,9 +361,7 @@ public class AutoFetchNotifier {
}
private static void cancelInProgress() {
// TODO(https://crbug.com/1067314): Use the current profile (i.e., regular profile or
// incognito profile) instead of always using regular profile. It is wrong and need to be
// fixed.
// Using regular profile here, since this function is only called in regular mode.
AutoFetchNotifierJni.get().cancelInProgress(Profile.getLastUsedRegularProfile());
}
......
......@@ -270,9 +270,7 @@ public class OfflineNotificationBackgroundTask extends NativeBackgroundTask {
if (sOfflinePageBridgeForTesting != null) {
return sOfflinePageBridgeForTesting;
}
// TODO(https://crbug.com/1067314): Use the current profile (i.e., regular profile or
// incognito profile) instead of always using regular profile. It is wrong and need to be
// fixed.
// Using regular profile here, since this function is only called in regular mode.
return OfflinePageBridge.getForProfile(Profile.getLastUsedRegularProfile());
}
......
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