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

Replace |profile_key_util.cc#GetLastUsedProfileKey| on updates.

This CL replaces usages of |profile_key_util.cc#GetLastUsedProfileKey|
with |profile_key_util.cc#GetLastUsedRegularProfileKey| in
update_notification_service_bridge_android.cc. Since
UpdateNotificationServiceFactory returns the same instance for both
regular and incognito profile, it is correct to use always regular
profile. However, this is not safe in case of future changes as TODO
states.

Note: This CL is only clean-up and does not change code behaviour.

Bug: 1041781
Change-Id: I39e6003e9846f6f58a52e0fb291a30ac761bf5cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246693
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarHesen Zhang <hesen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779723}
parent 7bab0152
......@@ -30,7 +30,7 @@ void JNI_UpdateNotificationServiceBridge_Schedule(
const JavaParamRef<jstring>& j_message,
const jint j_state,
const jboolean j_show_immediately) {
ProfileKey* profile_key = ::android::GetLastUsedProfileKey();
ProfileKey* profile_key = ::android::GetLastUsedRegularProfileKey();
auto* update_notification_service =
UpdateNotificationServiceFactory::GetForKey(profile_key);
UpdateNotificationInfo data;
......
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