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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.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 unified diff | Download patch
OLDNEW
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.chrome.browser.firstrun; 5 package org.chromium.chrome.browser.firstrun;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.PendingIntent; 9 import android.app.PendingIntent;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 }.start(mActivity.getApplicationContext()); 84 }.start(mActivity.getApplicationContext());
85 } 85 }
86 86
87 @VisibleForTesting 87 @VisibleForTesting
88 protected boolean isFirstRunFlowComplete() { 88 protected boolean isFirstRunFlowComplete() {
89 return FirstRunStatus.getFirstRunFlowComplete(); 89 return FirstRunStatus.getFirstRunFlowComplete();
90 } 90 }
91 91
92 @VisibleForTesting 92 @VisibleForTesting
93 protected boolean isSignedIn() { 93 protected boolean isSignedIn() {
94 return ChromeSigninController.get(mActivity).isSignedIn(); 94 return ChromeSigninController.get().isSignedIn();
95 } 95 }
96 96
97 @VisibleForTesting 97 @VisibleForTesting
98 protected boolean isSyncAllowed() { 98 protected boolean isSyncAllowed() {
99 SigninManager signinManager = SigninManager.get(mActivity.getApplication Context()); 99 SigninManager signinManager = SigninManager.get(mActivity.getApplication Context());
100 return FeatureUtilities.canAllowSync(mActivity) && !signinManager.isSign inDisabledByPolicy() 100 return FeatureUtilities.canAllowSync(mActivity) && !signinManager.isSign inDisabledByPolicy()
101 && signinManager.isSigninSupported(); 101 && signinManager.isSigninSupported();
102 } 102 }
103 103
104 @VisibleForTesting 104 @VisibleForTesting
105 protected Account[] getGoogleAccounts() { 105 protected Account[] getGoogleAccounts() {
106 return AccountManagerHelper.get(mActivity).getGoogleAccounts(); 106 return AccountManagerHelper.get().getGoogleAccounts();
107 } 107 }
108 108
109 @VisibleForTesting 109 @VisibleForTesting
110 protected boolean hasAnyUserSeenToS() { 110 protected boolean hasAnyUserSeenToS() {
111 return ToSAckedReceiver.checkAnyUserHasSeenToS(mActivity); 111 return ToSAckedReceiver.checkAnyUserHasSeenToS(mActivity);
112 } 112 }
113 113
114 @VisibleForTesting 114 @VisibleForTesting
115 protected boolean shouldSkipFirstUseHints() { 115 protected boolean shouldSkipFirstUseHints() {
116 return ApiCompatibilityUtils.shouldSkipFirstUseHints(mActivity.getConten tResolver()); 116 return ApiCompatibilityUtils.shouldSkipFirstUseHints(mActivity.getConten tResolver());
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 * @param fromIntent The intent that was used to launch Chrome. 311 * @param fromIntent The intent that was used to launch Chrome.
312 */ 312 */
313 public static void addPendingIntent(Context context, Intent firstRunIntent, Intent fromIntent) { 313 public static void addPendingIntent(Context context, Intent firstRunIntent, Intent fromIntent) {
314 PendingIntent pendingIntent = PendingIntent.getActivity(context, 314 PendingIntent pendingIntent = PendingIntent.getActivity(context,
315 FIRST_RUN_EXPERIENCE_REQUEST_CODE, 315 FIRST_RUN_EXPERIENCE_REQUEST_CODE,
316 fromIntent, 316 fromIntent,
317 fromIntent.getFlags()); 317 fromIntent.getFlags());
318 firstRunIntent.putExtra(FirstRunActivity.EXTRA_CHROME_LAUNCH_INTENT, pen dingIntent); 318 firstRunIntent.putExtra(FirstRunActivity.EXTRA_CHROME_LAUNCH_INTENT, pen dingIntent);
319 } 319 }
320 } 320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698