Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1380)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/JobSchedulerConstants.java

Issue 2690163008: Route through a JobService when receiving a message for the GCM Driver (Closed)
Patch Set: Route through a JobService when receiving a message for the GCM Driver Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a218aeb47a6bdaf05a655ef0c749ab8b8ad7c73d
--- /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 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 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 = 21;
+
+ /** Job ID 42 is reserved for WebView's CrashReceiverService. **/
+}

Powered by Google App Engine
This is Rietveld 408576698