Commit 50e57584 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Replace |getLastUsedProfileKey#getOriginalKey| with

|getLastUsedRegularProfileKey|.

|ProfileKey#getLastUsedProfileKey| is depreciated and replaced with
|ProfileKey#getLastUsedRegularProfileKey|. This change replaces
|ProfileKey#getLastUsedProfileKey#getOriginalKey| with
|ProfileKey#getLastUsedRegularProfileKey|.

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

Bug: 1041781
Change-Id: Ic55693571ad10395ff9c88e5bf965b0578768c77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089869Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749583}
parent c7f1fbc0
......@@ -47,7 +47,8 @@ public final class ProxyNativeTask extends NativeBackgroundTask {
ProxyNativeTask.this, Profile.getLastUsedRegularProfile());
} else {
ProxyNativeTaskJni.get().startBackgroundTaskInReducedMode(mNativeProxyNativeTask,
ProxyNativeTask.this, ProfileKey.getLastUsedProfileKey().getOriginalKey());
ProxyNativeTask.this,
ProfileKey.getLastUsedRegularProfileKey());
BrowserStartupController.getInstance().addStartupCompletedObserver(
new BrowserStartupController.StartupCallback() {
@Override
......
......@@ -62,7 +62,7 @@ public class DownloadBackgroundTask extends NativeBackgroundTask {
assert BrowserStartupController.getInstance().isFullBrowserStarted()
|| mStartsServiceManagerOnly;
ProfileKey key = ProfileKey.getLastUsedProfileKey().getOriginalKey();
ProfileKey key = ProfileKey.getLastUsedRegularProfileKey();
DownloadBackgroundTaskJni.get().startBackgroundTask(DownloadBackgroundTask.this, key,
mCurrentTaskType, needsReschedule -> callback.taskFinished(needsReschedule));
}
......@@ -81,7 +81,7 @@ public class DownloadBackgroundTask extends NativeBackgroundTask {
protected boolean onStopTaskWithNative(Context context, TaskParameters taskParameters) {
@DownloadTaskType
int taskType = taskParameters.getExtras().getInt(DownloadTaskScheduler.EXTRA_TASK_TYPE);
ProfileKey key = ProfileKey.getLastUsedProfileKey().getOriginalKey();
ProfileKey key = ProfileKey.getLastUsedRegularProfileKey();
return DownloadBackgroundTaskJni.get().stopBackgroundTask(
DownloadBackgroundTask.this, key, taskType);
}
......
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