Index: chrome/android/java/src/org/chromium/chrome/browser/JobSchedulerConstants.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/JobSchedulerConstants.java b/chrome/android/java/src/org/chromium/chrome/browser/JobSchedulerConstants.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..610f6bea3884d0fcf278296963913720f71c4479 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/JobSchedulerConstants.java |
@@ -0,0 +1,25 @@ |
+// Copyright 2017 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. |
+ |
+package org.chromium.chrome.browser; |
+ |
+/** |
+ * Constants to use when interacting with the android.app.job.JobScheduler. Primarily, each job |
+ * must have a unique ID in order to avoid state of different jobs mixing up. |
+ */ |
+public class JobSchedulerConstants { |
+ /** |
+ * Job ID for the notification service, which enables us to run a Service Worker in response to |
+ * click and close events of notifications. |
+ */ |
+ public static final int NOTIFICATION_SERVICE_JOB_ID = 0; |
+ |
+ /** |
+ * Job ID for the GCM Driver, which handles received push messages to native consumers such as |
+ * Web Push Notifications, execution of which may exceed the permitted time. |
+ */ |
+ public static final int GCM_DRIVER_JOB_ID = 1; |
+ |
+ /** Job ID 2 is reserved for WebView's CrashReceiverService. **/ |
+} |