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

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

Issue 845543005: Rename SyncStatusHelper to AndroidSyncSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gsm
Patch Set: Created 5 years, 11 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/sync/SyncNotificationController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
index 4b561c71b82b0b65ff5027e5a759b30b38ae9231..94533f27eb3926ec6106a38070ae547abc471884 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.notifications.GoogleServicesNotificationController;
import org.chromium.chrome.browser.notifications.NotificationConstants;
import org.chromium.chrome.browser.preferences.PreferencesLauncher;
+import org.chromium.sync.AndroidSyncSettings;
import org.chromium.sync.notifier.SyncStatusHelper;
/**
@@ -27,19 +28,31 @@ public class SyncNotificationController implements ProfileSyncService.SyncStateC
private static final String TAG = "SyncNotificationController";
private final Context mApplicationContext;
private final GoogleServicesNotificationController mNotificationController;
- private final SyncStatusHelper mSyncStatusHelper;
+ private final AndroidSyncSettings mAndroidSyncSettings;
private final Class<? extends Activity> mPassphraseRequestActivity;
private final Class<? extends Fragment> mAccountManagementFragment;
private final ProfileSyncService mProfileSyncService;
public SyncNotificationController(Context context,
+ GoogleServicesNotificationController controller,
+ Class<? extends Activity> passphraseRequestActivity,
+ Class<? extends Fragment> accountManagementFragment) {
+ mApplicationContext = context.getApplicationContext();
+ mNotificationController = controller;
+ mProfileSyncService = ProfileSyncService.get(context);
+ mAndroidSyncSettings = AndroidSyncSettings.get(context);
+ mPassphraseRequestActivity = passphraseRequestActivity;
+ mAccountManagementFragment = accountManagementFragment;
+ }
+
+ public SyncNotificationController(Context context,
nyquist 2015/01/16 17:52:25 Nit: Add a comment that this is deprecated?
maxbogue 2015/01/16 23:38:27 I'm going to actually mark it @Deprecated as well.
GoogleServicesNotificationController controller, ProfileSyncService profileSyncService,
SyncStatusHelper syncStatusHelper, Class<? extends Activity> passphraseRequestActivity,
Class<? extends Fragment> accountManagementFragment) {
mApplicationContext = context.getApplicationContext();
mNotificationController = controller;
mProfileSyncService = profileSyncService;
- mSyncStatusHelper = syncStatusHelper;
+ mAndroidSyncSettings = AndroidSyncSettings.get(context);
mPassphraseRequestActivity = passphraseRequestActivity;
mAccountManagementFragment = accountManagementFragment;
}
@@ -63,7 +76,7 @@ public class SyncNotificationController implements ProfileSyncService.SyncStateC
Intent intent;
// Auth errors take precedence over passphrase errors.
- if (!mSyncStatusHelper.isSyncEnabled()) {
+ if (!mAndroidSyncSettings.isSyncEnabled()) {
mNotificationController.cancelNotification(NotificationConstants.NOTIFICATION_ID_SYNC);
return;
}

Powered by Google App Engine
This is Rietveld 408576698