| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.signin; | 5 package org.chromium.chrome.browser.signin; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.text.TextUtils; | 8 import android.text.TextUtils; |
| 9 | 9 |
| 10 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
| 11 import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; | 11 import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; |
| 12 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; | 12 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; |
| 13 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | 13 import org.chromium.chrome.browser.preferences.PrefServiceBridge; |
| 14 import org.chromium.sync.signin.ChromeSigninController; | 14 import org.chromium.components.sync.signin.ChromeSigninController; |
| 15 import org.chromium.ui.base.WindowAndroid; | 15 import org.chromium.ui.base.WindowAndroid; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Helper functions for promoting sign in. | 18 * Helper functions for promoting sign in. |
| 19 */ | 19 */ |
| 20 public class SigninPromoUtil { | 20 public class SigninPromoUtil { |
| 21 private SigninPromoUtil() {} | 21 private SigninPromoUtil() {} |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Launches the signin promo if it needs to be displayed. | 24 * Launches the signin promo if it needs to be displayed. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 51 * @param accessPoint for metrics purposes. | 51 * @param accessPoint for metrics purposes. |
| 52 */ | 52 */ |
| 53 @CalledByNative | 53 @CalledByNative |
| 54 private static void openAccountSigninActivityForPromo(WindowAndroid window,
int accessPoint) { | 54 private static void openAccountSigninActivityForPromo(WindowAndroid window,
int accessPoint) { |
| 55 Activity activity = window.getActivity().get(); | 55 Activity activity = window.getActivity().get(); |
| 56 if (activity != null) { | 56 if (activity != null) { |
| 57 AccountSigninActivity.startIfAllowed(activity, accessPoint); | 57 AccountSigninActivity.startIfAllowed(activity, accessPoint); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 } | 60 } |
| OLD | NEW |