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

Side by Side Diff: components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java

Issue 2830843002: [Offline pages] Updates to background scheduling to use BTS (Closed)
Patch Set: Fixing the crash on NCN not being initialized Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPackerTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.components.background_task_scheduler; 5 package org.chromium.components.background_task_scheduler;
6 6
7 import android.os.Build; 7 import android.os.Build;
8 8
9 import org.chromium.base.ThreadUtils; 9 import org.chromium.base.ThreadUtils;
10 import org.chromium.base.VisibleForTesting; 10 import org.chromium.base.VisibleForTesting;
(...skipping 19 matching lines...) Expand all
30 public static BackgroundTaskScheduler getScheduler() { 30 public static BackgroundTaskScheduler getScheduler() {
31 ThreadUtils.assertOnUiThread(); 31 ThreadUtils.assertOnUiThread();
32 if (sInstance == null) { 32 if (sInstance == null) {
33 sInstance = 33 sInstance =
34 new BackgroundTaskScheduler(getSchedulerDelegateForSdk(Build .VERSION.SDK_INT)); 34 new BackgroundTaskScheduler(getSchedulerDelegateForSdk(Build .VERSION.SDK_INT));
35 } 35 }
36 return sInstance; 36 return sInstance;
37 } 37 }
38 38
39 @VisibleForTesting 39 @VisibleForTesting
40 static void setSchedulerForTesting(BackgroundTaskScheduler scheduler) { 40 public static void setSchedulerForTesting(BackgroundTaskScheduler scheduler) {
41 sInstance = scheduler; 41 sInstance = scheduler;
42 } 42 }
43 43
44 // Do not instantiate. 44 // Do not instantiate.
45 private BackgroundTaskSchedulerFactory() {} 45 private BackgroundTaskSchedulerFactory() {}
46 } 46 }
OLDNEW
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/TaskExtrasPackerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698