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.invalidation; | 5 package org.chromium.chrome.browser.invalidation; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.content.ContentResolver; | 8 import android.content.ContentResolver; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.SharedPreferences; | 10 import android.content.SharedPreferences; |
11 import android.os.AsyncTask; | 11 import android.os.AsyncTask; |
12 import android.os.Bundle; | 12 import android.os.Bundle; |
13 | 13 |
14 import org.chromium.base.ApplicationStatus; | 14 import org.chromium.base.ApplicationStatus; |
15 import org.chromium.base.ContextUtils; | 15 import org.chromium.base.ContextUtils; |
16 import org.chromium.base.Log; | 16 import org.chromium.base.Log; |
17 import org.chromium.base.VisibleForTesting; | 17 import org.chromium.base.VisibleForTesting; |
18 import org.chromium.components.invalidation.PendingInvalidation; | 18 import org.chromium.components.invalidation.PendingInvalidation; |
19 import org.chromium.sync.AndroidSyncSettings; | 19 import org.chromium.components.sync.AndroidSyncSettings; |
20 import org.chromium.sync.signin.AccountManagerHelper; | 20 import org.chromium.components.sync.signin.AccountManagerHelper; |
21 | 21 |
22 import java.util.ArrayList; | 22 import java.util.ArrayList; |
23 import java.util.Arrays; | 23 import java.util.Arrays; |
24 import java.util.HashSet; | 24 import java.util.HashSet; |
25 import java.util.List; | 25 import java.util.List; |
26 import java.util.Set; | 26 import java.util.Set; |
27 | 27 |
28 /** | 28 /** |
29 * A class for controlling whether an invalidation should be notified immediatel
y, or should be | 29 * A class for controlling whether an invalidation should be notified immediatel
y, or should be |
30 * delayed until Chrome comes to the foreground again. | 30 * delayed until Chrome comes to the foreground again. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 | 148 |
149 private static boolean isManualRequest(Bundle extras) { | 149 private static boolean isManualRequest(Bundle extras) { |
150 if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, false)) { | 150 if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, false)) { |
151 Log.d(TAG, "Manual sync requested."); | 151 Log.d(TAG, "Manual sync requested."); |
152 return true; | 152 return true; |
153 } | 153 } |
154 return false; | 154 return false; |
155 } | 155 } |
156 } | 156 } |
OLD | NEW |