| OLD | NEW |
| 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.services; | 5 package org.chromium.chrome.browser.services; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import org.chromium.base.ApplicationState; | 10 import org.chromium.base.ApplicationState; |
| 11 import org.chromium.base.ApplicationStatus; | 11 import org.chromium.base.ApplicationStatus; |
| 12 import org.chromium.base.ApplicationStatus.ApplicationStateListener; | 12 import org.chromium.base.ApplicationStatus.ApplicationStateListener; |
| 13 import org.chromium.base.ThreadUtils; | 13 import org.chromium.base.ThreadUtils; |
| 14 import org.chromium.base.TraceEvent; | 14 import org.chromium.base.TraceEvent; |
| 15 import org.chromium.base.VisibleForTesting; | 15 import org.chromium.base.VisibleForTesting; |
| 16 import org.chromium.chrome.browser.signin.SigninHelper; | 16 import org.chromium.chrome.browser.signin.SigninHelper; |
| 17 import org.chromium.chrome.browser.signin.SigninManager; | 17 import org.chromium.chrome.browser.signin.SigninManager; |
| 18 import org.chromium.chrome.browser.sync.SyncController; | 18 import org.chromium.chrome.browser.sync.SyncController; |
| 19 import org.chromium.sync.signin.ChromeSigninController; | 19 import org.chromium.components.sync.signin.ChromeSigninController; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Starts and monitors various sync and Google services related tasks. | 22 * Starts and monitors various sync and Google services related tasks. |
| 23 * - add listeners to AccountManager. | 23 * - add listeners to AccountManager. |
| 24 * - sets up the Android status bar notification controller. | 24 * - sets up the Android status bar notification controller. |
| 25 * - start Tango service if sync setup is completed. | 25 * - start Tango service if sync setup is completed. |
| 26 * <p/> | 26 * <p/> |
| 27 * It is intended to be an application level object and is not tied to any parti
culary | 27 * It is intended to be an application level object and is not tied to any parti
culary |
| 28 * activity, although re-verifies some settings whe browser is launched. | 28 * activity, although re-verifies some settings whe browser is launched. |
| 29 * <p/> | 29 * <p/> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 @Override | 111 @Override |
| 112 public void onApplicationStateChange(int newState) { | 112 public void onApplicationStateChange(int newState) { |
| 113 if (newState == ApplicationState.HAS_RUNNING_ACTIVITIES) { | 113 if (newState == ApplicationState.HAS_RUNNING_ACTIVITIES) { |
| 114 onMainActivityStart(); | 114 onMainActivityStart(); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| OLD | NEW |