| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..44b7203dc9ad2ebc17f491f36720c1b0c515291d
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPacker.java
|
| @@ -0,0 +1,25 @@
|
| +// Copyright 2016 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.offlinepages;
|
| +
|
| +import android.os.Bundle;
|
| +
|
| +/**
|
| + * Class to put our custom task information into the task bundle.
|
| + */
|
| +public class TaskExtrasPacker {
|
| + /** Bundle key for the timestamp in milliseconds when the request started. */
|
| + public static final String SCHEDULED_TIME_TAG = "Date";
|
| +
|
| + /** Puts current time into the input bundle. */
|
| + public static void packTimeInBundle(Bundle bundle) {
|
| + bundle.putLong(SCHEDULED_TIME_TAG, System.currentTimeMillis());
|
| + }
|
| +
|
| + /** Extracts the time we put into the bundle. */
|
| + public static long unpackTimeFromBundle(Bundle bundle) {
|
| + return bundle.getLong(SCHEDULED_TIME_TAG);
|
| + }
|
| +}
|
|
|