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

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

Issue 1025403002: [Sync] PassphraseActivity: unregister for sync events when paused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ChromeActivityTestBase and rename FakeProfileSyncService. Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
index 4f7c8706e980e282eeca243cac9b4d5943b16dcc..92bf19e0f831a80a1f644bbfaddd1d41e4ffce71 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
@@ -53,7 +53,7 @@ public class ProfileSyncService {
@VisibleForTesting
public static final String SESSION_TAG_PREFIX = "session_sync";
- private static ProfileSyncService sSyncSetupManager;
+ private static ProfileSyncService sProfileSyncService;
@VisibleForTesting
protected final Context mContext;
@@ -76,16 +76,21 @@ public class ProfileSyncService {
@SuppressFBWarnings("LI_LAZY_INIT")
public static ProfileSyncService get(Context context) {
ThreadUtils.assertOnUiThread();
- if (sSyncSetupManager == null) {
- sSyncSetupManager = new ProfileSyncService(context);
+ if (sProfileSyncService == null) {
+ sProfileSyncService = new ProfileSyncService(context);
}
- return sSyncSetupManager;
+ return sProfileSyncService;
+ }
+
+ @VisibleForTesting
+ public static void overrideForTests(ProfileSyncService profileSyncService) {
+ sProfileSyncService = profileSyncService;
}
/**
* This is called pretty early in our application. Avoid any blocking operations here.
*/
- private ProfileSyncService(Context context) {
+ protected ProfileSyncService(Context context) {
ThreadUtils.assertOnUiThread();
// We should store the application context, as we outlive any activity which may create us.
mContext = context.getApplicationContext();
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698