Commit 8b497e74 authored by maxbogue's avatar maxbogue Committed by Commit bot

Completely remove SyncStatusHelper.

It was renamed to AndroidSyncSettings in http://crrev.com/845543005.

Review URL: https://codereview.chromium.org/887143002

Cr-Commit-Position: refs/heads/master@{#314427}
parent a7d368e7
...@@ -46,7 +46,7 @@ import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver; ...@@ -46,7 +46,7 @@ import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
import org.chromium.chrome.browser.sync.GoogleServiceAuthError; import org.chromium.chrome.browser.sync.GoogleServiceAuthError;
import org.chromium.chrome.browser.sync.ProfileSyncService; import org.chromium.chrome.browser.sync.ProfileSyncService;
import org.chromium.chrome.browser.sync.ProfileSyncService.SyncStateChangedListener; import org.chromium.chrome.browser.sync.ProfileSyncService.SyncStateChangedListener;
import org.chromium.sync.notifier.SyncStatusHelper; import org.chromium.sync.AndroidSyncSettings;
import org.chromium.sync.signin.AccountManagerHelper; import org.chromium.sync.signin.AccountManagerHelper;
import org.chromium.sync.signin.ChromeSigninController; import org.chromium.sync.signin.ChromeSigninController;
...@@ -388,7 +388,7 @@ public class AccountManagementFragment extends PreferenceFragment ...@@ -388,7 +388,7 @@ public class AccountManagementFragment extends PreferenceFragment
ProfileAccountManagementMetrics.CLICK_PRIMARY_ACCOUNT, ProfileAccountManagementMetrics.CLICK_PRIMARY_ACCOUNT,
mGaiaServiceType); mGaiaServiceType);
if (SyncStatusHelper.get(activity).isMasterSyncAutomaticallyEnabled()) { if (AndroidSyncSettings.get(activity).isMasterSyncEnabled()) {
getDelegate().openSyncCustomizationFragment(activity, account); getDelegate().openSyncCustomizationFragment(activity, account);
} else { } else {
Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS); Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
...@@ -470,7 +470,7 @@ public class AccountManagementFragment extends PreferenceFragment ...@@ -470,7 +470,7 @@ public class AccountManagementFragment extends PreferenceFragment
ChromeSigninController signinController = ChromeSigninController.get(activity); ChromeSigninController signinController = ChromeSigninController.get(activity);
if (!signinController.isSignedIn()) return ""; if (!signinController.isSignedIn()) return "";
SyncStatusHelper syncStatusHelper = SyncStatusHelper.get(activity); AndroidSyncSettings androidSyncSettings = AndroidSyncSettings.get(activity);
ProfileSyncService profileSyncService = ProfileSyncService.get(activity); ProfileSyncService profileSyncService = ProfileSyncService.get(activity);
Resources res = activity.getResources(); Resources res = activity.getResources();
...@@ -478,7 +478,7 @@ public class AccountManagementFragment extends PreferenceFragment ...@@ -478,7 +478,7 @@ public class AccountManagementFragment extends PreferenceFragment
return res.getString(R.string.kids_account); return res.getString(R.string.kids_account);
} }
if (!syncStatusHelper.isMasterSyncAutomaticallyEnabled()) { if (!androidSyncSettings.isMasterSyncEnabled()) {
return res.getString(R.string.sync_android_master_sync_disabled); return res.getString(R.string.sync_android_master_sync_disabled);
} }
...@@ -486,7 +486,7 @@ public class AccountManagementFragment extends PreferenceFragment ...@@ -486,7 +486,7 @@ public class AccountManagementFragment extends PreferenceFragment
return res.getString(profileSyncService.getAuthError().getMessage()); return res.getString(profileSyncService.getAuthError().getMessage());
} }
if (syncStatusHelper.isSyncEnabled()) { if (androidSyncSettings.isSyncEnabled()) {
if (!profileSyncService.isSyncInitialized()) { if (!profileSyncService.isSyncInitialized()) {
return res.getString(R.string.sync_setup_progress); return res.getString(R.string.sync_setup_progress);
} }
...@@ -504,7 +504,7 @@ public class AccountManagementFragment extends PreferenceFragment ...@@ -504,7 +504,7 @@ public class AccountManagementFragment extends PreferenceFragment
} }
} }
return syncStatusHelper.isSyncEnabled(signinController.getSignedInUser()) return androidSyncSettings.isSyncEnabled(signinController.getSignedInUser())
? res.getString(R.string.sync_is_enabled) ? res.getString(R.string.sync_is_enabled)
: res.getString(R.string.sync_is_disabled); : res.getString(R.string.sync_is_disabled);
} }
......
...@@ -18,7 +18,6 @@ import org.chromium.chrome.browser.notifications.GoogleServicesNotificationContr ...@@ -18,7 +18,6 @@ import org.chromium.chrome.browser.notifications.GoogleServicesNotificationContr
import org.chromium.chrome.browser.notifications.NotificationConstants; import org.chromium.chrome.browser.notifications.NotificationConstants;
import org.chromium.chrome.browser.preferences.PreferencesLauncher; import org.chromium.chrome.browser.preferences.PreferencesLauncher;
import org.chromium.sync.AndroidSyncSettings; import org.chromium.sync.AndroidSyncSettings;
import org.chromium.sync.notifier.SyncStatusHelper;
/** /**
* {@link SyncNotificationController} provides functionality for displaying Android notifications * {@link SyncNotificationController} provides functionality for displaying Android notifications
...@@ -45,22 +44,6 @@ public class SyncNotificationController implements ProfileSyncService.SyncStateC ...@@ -45,22 +44,6 @@ public class SyncNotificationController implements ProfileSyncService.SyncStateC
mAccountManagementFragment = accountManagementFragment; mAccountManagementFragment = accountManagementFragment;
} }
/**
* Deprecated for having unnecessary args; use the first constructor.
*/
@Deprecated
public SyncNotificationController(Context context,
GoogleServicesNotificationController controller, ProfileSyncService profileSyncService,
SyncStatusHelper syncStatusHelper, Class<? extends Activity> passphraseRequestActivity,
Class<? extends Fragment> accountManagementFragment) {
mApplicationContext = context.getApplicationContext();
mNotificationController = controller;
mProfileSyncService = profileSyncService;
mAndroidSyncSettings = AndroidSyncSettings.get(context);
mPassphraseRequestActivity = passphraseRequestActivity;
mAccountManagementFragment = accountManagementFragment;
}
public void displayAndroidMasterSyncDisabledNotification() { public void displayAndroidMasterSyncDisabledNotification() {
String masterSyncDisabled = String masterSyncDisabled =
GoogleServicesNotificationController.formatMessageParts(mApplicationContext, GoogleServicesNotificationController.formatMessageParts(mApplicationContext,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment