Commit 17fa5c44 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Replace |profile_key_util.cc#GetLastUsedProfileKey| on notifications.

This CL replaces usages of |profile_key_util.cc#GetLastUsedProfileKey|
with |profile_key_util.cc#GetLastUsedRegularProfileKey| in notifications
classes.

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

Bug: 1041781
Change-Id: Id4583df9615bded3a779834d9bf7a78e10ad5f2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247773Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780212}
parent c3dc882a
...@@ -26,7 +26,7 @@ using base::android::ScopedJavaLocalRef; ...@@ -26,7 +26,7 @@ using base::android::ScopedJavaLocalRef;
namespace { namespace {
notifications::UserActionHandler* GetUserActionHandler() { notifications::UserActionHandler* GetUserActionHandler() {
ProfileKey* profile_key = ::android::GetLastUsedProfileKey(); ProfileKey* profile_key = ::android::GetLastUsedRegularProfileKey();
DCHECK(profile_key); DCHECK(profile_key);
auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key); auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key);
DCHECK(service); DCHECK(service);
......
...@@ -22,7 +22,7 @@ void JNI_NotificationSchedulerTask_OnStartTask( ...@@ -22,7 +22,7 @@ void JNI_NotificationSchedulerTask_OnStartTask(
JNIEnv* env, JNIEnv* env,
const base::android::JavaParamRef<jobject>& j_caller, const base::android::JavaParamRef<jobject>& j_caller,
const base::android::JavaParamRef<jobject>& j_callback) { const base::android::JavaParamRef<jobject>& j_callback) {
ProfileKey* profile_key = ::android::GetLastUsedProfileKey(); ProfileKey* profile_key = ::android::GetLastUsedRegularProfileKey();
auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key); auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key);
auto* handler = service->GetBackgroundTaskSchedulerHandler(); auto* handler = service->GetBackgroundTaskSchedulerHandler();
auto callback = auto callback =
...@@ -35,7 +35,7 @@ void JNI_NotificationSchedulerTask_OnStartTask( ...@@ -35,7 +35,7 @@ void JNI_NotificationSchedulerTask_OnStartTask(
jboolean JNI_NotificationSchedulerTask_OnStopTask( jboolean JNI_NotificationSchedulerTask_OnStopTask(
JNIEnv* env, JNIEnv* env,
const base::android::JavaParamRef<jobject>& j_caller) { const base::android::JavaParamRef<jobject>& j_caller) {
ProfileKey* profile_key = ::android::GetLastUsedProfileKey(); ProfileKey* profile_key = ::android::GetLastUsedRegularProfileKey();
auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key); auto* service = NotificationScheduleServiceFactory::GetForKey(profile_key);
auto* handler = service->GetBackgroundTaskSchedulerHandler(); auto* handler = service->GetBackgroundTaskSchedulerHandler();
handler->OnStopTask(); handler->OnStopTask();
......
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