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

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

Issue 2784353002: Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: Fix tests Created 3 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
Index: chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
index 849fab8be7e1c2ec76102e9661b5e9157062456a..7e5abc04cf9d9a1c48a49aa29116a5918b6d543d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
@@ -335,7 +335,7 @@ public class SyncCustomizationFragment extends PreferenceFragment
// We remove the the SyncedAccountPreference if there's only 1 account on the device, so
// it's possible for accountList to be null
if (accountList != null) {
- Account[] accounts = AccountManagerHelper.get(getActivity()).getGoogleAccounts();
+ Account[] accounts = AccountManagerHelper.get().getGoogleAccounts();
if (accounts.length <= 1) {
getPreferenceScreen().removePreference(accountList);
} else {
@@ -708,9 +708,8 @@ public class SyncCustomizationFragment extends PreferenceFragment
}
if (mCurrentSyncError == SYNC_AUTH_ERROR) {
- AccountManagerHelper.get(getActivity())
- .updateCredentials(ChromeSigninController.get(getActivity()).getSignedInUser(),
- getActivity(), null);
+ AccountManagerHelper.get().updateCredentials(
+ ChromeSigninController.get().getSignedInUser(), getActivity(), null);
return;
}
@@ -723,7 +722,7 @@ public class SyncCustomizationFragment extends PreferenceFragment
}
if (mCurrentSyncError == SYNC_OTHER_ERRORS) {
- final Account account = ChromeSigninController.get(getActivity()).getSignedInUser();
+ final Account account = ChromeSigninController.get().getSignedInUser();
SigninManager.get(getActivity()).signOut(new Runnable() {
@Override
public void run() {

Powered by Google App Engine
This is Rietveld 408576698