| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.content.SharedPreferences; | 8 import android.content.SharedPreferences; |
| 9 import android.preference.PreferenceManager; | 9 import android.preference.PreferenceManager; |
| 10 | 10 |
| 11 import org.chromium.base.CalledByNative; | |
| 12 import org.chromium.base.JNINamespace; | |
| 13 import org.chromium.base.VisibleForTesting; | 11 import org.chromium.base.VisibleForTesting; |
| 12 import org.chromium.base.annotations.CalledByNative; |
| 13 import org.chromium.base.annotations.JNINamespace; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * The {@link BackgroundSyncLauncher} singleton is created and owned by the C++
browser. It | 16 * The {@link BackgroundSyncLauncher} singleton is created and owned by the C++
browser. It |
| 17 * registers interest in waking up the browser the next time the device goes onl
ine after the | 17 * registers interest in waking up the browser the next time the device goes onl
ine after the |
| 18 *browser closes via the {@link #setLaunchWhenNextOnline} method. | 18 *browser closes via the {@link #setLaunchWhenNextOnline} method. |
| 19 * | 19 * |
| 20 * Thread model: This class is to be run on the UI thread only. | 20 * Thread model: This class is to be run on the UI thread only. |
| 21 */ | 21 */ |
| 22 @JNINamespace("content") | 22 @JNINamespace("content") |
| 23 public class BackgroundSyncLauncher { | 23 public class BackgroundSyncLauncher { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 */ | 83 */ |
| 84 protected static boolean hasInstance() { | 84 protected static boolean hasInstance() { |
| 85 return sInstance != null; | 85 return sInstance != null; |
| 86 } | 86 } |
| 87 | 87 |
| 88 private BackgroundSyncLauncher(Context context) { | 88 private BackgroundSyncLauncher(Context context) { |
| 89 mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(conte
xt); | 89 mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(conte
xt); |
| 90 setLaunchWhenNextOnline(false); | 90 setLaunchWhenNextOnline(false); |
| 91 } | 91 } |
| 92 } | 92 } |
| OLD | NEW |