| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.sync; | 5 package org.chromium.chrome.browser.sync; |
| 6 | 6 |
| 7 import android.accounts.Account; | 7 import android.accounts.Account; |
| 8 import android.app.Application; | 8 import android.app.Application; |
| 9 import android.content.AbstractThreadedSyncAdapter; | 9 import android.content.AbstractThreadedSyncAdapter; |
| 10 import android.content.ContentProviderClient; | 10 import android.content.ContentProviderClient; |
| 11 import android.content.Context; | 11 import android.content.Context; |
| 12 import android.content.SyncResult; | 12 import android.content.SyncResult; |
| 13 import android.os.Bundle; | 13 import android.os.Bundle; |
| 14 import android.os.Handler; | 14 import android.os.Handler; |
| 15 import android.util.Log; | 15 import android.util.Log; |
| 16 | 16 |
| 17 import com.google.common.annotations.VisibleForTesting; | 17 import com.google.common.annotations.VisibleForTesting; |
| 18 import com.google.protos.ipc.invalidation.Types; | 18 import com.google.protos.ipc.invalidation.Types; |
| 19 | 19 |
| 20 import org.chromium.base.ThreadUtils; | 20 import org.chromium.base.ThreadUtils; |
| 21 import org.chromium.base.library_loader.ProcessInitException; |
| 21 import org.chromium.content.browser.BrowserStartupController; | 22 import org.chromium.content.browser.BrowserStartupController; |
| 22 import org.chromium.content.common.ProcessInitException; | |
| 23 | 23 |
| 24 import java.util.concurrent.Semaphore; | 24 import java.util.concurrent.Semaphore; |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * A sync adapter for Chromium. | 27 * A sync adapter for Chromium. |
| 28 */ | 28 */ |
| 29 public abstract class ChromiumSyncAdapter extends AbstractThreadedSyncAdapter { | 29 public abstract class ChromiumSyncAdapter extends AbstractThreadedSyncAdapter { |
| 30 private static final String TAG = "ChromiumSyncAdapter"; | 30 private static final String TAG = "ChromiumSyncAdapter"; |
| 31 | 31 |
| 32 // TODO(nyquist) Make these fields package protected once downstream sync ad
apter tests are | 32 // TODO(nyquist) Make these fields package protected once downstream sync ad
apter tests are |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 public void requestSync(int objectSource, String objectId, long version, Str
ing payload) { | 171 public void requestSync(int objectSource, String objectId, long version, Str
ing payload) { |
| 172 ProfileSyncService.get(mApplication) | 172 ProfileSyncService.get(mApplication) |
| 173 .requestSyncFromNativeChrome(objectSource, objectId, version, pa
yload); | 173 .requestSyncFromNativeChrome(objectSource, objectId, version, pa
yload); |
| 174 } | 174 } |
| 175 | 175 |
| 176 @VisibleForTesting | 176 @VisibleForTesting |
| 177 public void requestSyncForAllTypes() { | 177 public void requestSyncForAllTypes() { |
| 178 ProfileSyncService.get(mApplication).requestSyncFromNativeChromeForAllTy
pes(); | 178 ProfileSyncService.get(mApplication).requestSyncFromNativeChromeForAllTy
pes(); |
| 179 } | 179 } |
| 180 } | 180 } |
| OLD | NEW |