Commit 4d80a1aa authored by Hesen Zhang's avatar Hesen Zhang Committed by Commit Bot

Notification Scheduler: move SchedulerTaskTime to public and make the Java counterpart

Bug: 966969
Change-Id: I1178622066411bad23e14386511583fabe8971d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629015
Commit-Queue: Hesen Zhang <hesen@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664006}
parent ae2eee3e
...@@ -422,6 +422,7 @@ android_library("chrome_java") { ...@@ -422,6 +422,7 @@ android_library("chrome_java") {
"//components/signin/core/browser:signin_enums_javagen", "//components/signin/core/browser:signin_enums_javagen",
"//components/supervised_user_error_page:enums_srcjar", "//components/supervised_user_error_page:enums_srcjar",
"//components/ui_metrics:ui_metrics_enums_java", "//components/ui_metrics:ui_metrics_enums_java",
"//chrome/browser/notifications/scheduler:jni_enums",
"//chrome/browser/ui:tab_model_enums_java", "//chrome/browser/ui:tab_model_enums_java",
"//net:effective_connection_type_java", "//net:effective_connection_type_java",
":vr_build_config", ":vr_build_config",
......
...@@ -20,7 +20,6 @@ group("scheduler") { ...@@ -20,7 +20,6 @@ group("scheduler") {
source_set("public") { source_set("public") {
sources = [ sources = [
"internal_types.h",
"notification_background_task_scheduler.h", "notification_background_task_scheduler.h",
"notification_data.cc", "notification_data.cc",
"notification_data.h", "notification_data.h",
...@@ -86,7 +85,6 @@ source_set("lib") { ...@@ -86,7 +85,6 @@ source_set("lib") {
"impression_types.h", "impression_types.h",
"init_aware_scheduler.cc", "init_aware_scheduler.cc",
"init_aware_scheduler.h", "init_aware_scheduler.h",
"internal_types.h",
"notification_entry.cc", "notification_entry.cc",
"notification_entry.h", "notification_entry.h",
"notification_schedule_service_impl.cc", "notification_schedule_service_impl.cc",
...@@ -143,3 +141,11 @@ source_set("unit_tests") { ...@@ -143,3 +141,11 @@ source_set("unit_tests") {
"//testing/gtest", "//testing/gtest",
] ]
} }
if (is_android) {
java_cpp_enum("jni_enums") {
sources = [
"notification_scheduler_types.h",
]
}
}
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <vector> #include <vector>
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/notifications/scheduler/internal_types.h"
#include "chrome/browser/notifications/scheduler/notification_scheduler_types.h" #include "chrome/browser/notifications/scheduler/notification_scheduler_types.h"
namespace base { namespace base {
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/notifications/scheduler/internal_types.h"
#include "chrome/browser/notifications/scheduler/notification_scheduler_types.h" #include "chrome/browser/notifications/scheduler/notification_scheduler_types.h"
namespace notifications { namespace notifications {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <memory> #include <memory>
#include "base/macros.h" #include "base/macros.h"
#include "chrome/browser/notifications/scheduler/internal_types.h" #include "chrome/browser/notifications/scheduler/notification_scheduler_types.h"
namespace notifications { namespace notifications {
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/optional.h" #include "base/optional.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/notifications/scheduler/internal_types.h"
#include "chrome/browser/notifications/scheduler/notification_scheduler_types.h" #include "chrome/browser/notifications/scheduler/notification_scheduler_types.h"
namespace notifications { namespace notifications {
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_NOTIFICATIONS_SCHEDULER_INTERNAL_TYPES_H_
#define CHROME_BROWSER_NOTIFICATIONS_SCHEDULER_INTERNAL_TYPES_H_
namespace notifications {
// Enum to describe the time to process scheduled notification data.
enum class SchedulerTaskTime {
// The system is started from normal user launch or other background
// tasks.
kUnknown = 0,
// Background task runs in the morning.
kMorning = 1,
// Background task runs in the evening.
kEvening = 2,
};
} // namespace notifications
#endif // CHROME_BROWSER_NOTIFICATIONS_SCHEDULER_INTERNAL_TYPES_H_
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/notifications/scheduler/internal_types.h" #include "chrome/browser/notifications/scheduler/notification_scheduler_types.h"
namespace notifications { namespace notifications {
......
...@@ -7,6 +7,20 @@ ...@@ -7,6 +7,20 @@
namespace notifications { namespace notifications {
// Enum to describe the time to process scheduled notification data.
// A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: (
// org.chromium.chrome.browser.notifications.scheduler)
enum class SchedulerTaskTime {
// The system is started from normal user launch or other background
// tasks.
kUnknown = 0,
// Background task runs in the morning.
kMorning = 1,
// Background task runs in the evening.
kEvening = 2,
};
// The type of a list of clients using the notification scheduler system. // The type of a list of clients using the notification scheduler system.
enum class SchedulerClientType { enum class SchedulerClientType {
// Test only values. // Test only values.
......
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