| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.sync; | 5 package org.chromium.components.sync; |
| 6 | |
| 7 | 6 |
| 8 import android.accounts.Account; | 7 import android.accounts.Account; |
| 9 import android.content.SyncStatusObserver; | 8 import android.content.SyncStatusObserver; |
| 10 import android.os.Bundle; | 9 import android.os.Bundle; |
| 11 | 10 |
| 12 /** | 11 /** |
| 13 * Since the ContentResolver in Android has a lot of static methods, it is hard
to | 12 * Since the ContentResolver in Android has a lot of static methods, it is hard
to |
| 14 * mock out for tests. This interface wraps all the sync-related methods we use
from | 13 * mock out for tests. This interface wraps all the sync-related methods we use
from |
| 15 * the Android ContentResolver. | 14 * the Android ContentResolver. |
| 16 */ | 15 */ |
| 17 public interface SyncContentResolverDelegate { | 16 public interface SyncContentResolverDelegate { |
| 18 | |
| 19 Object addStatusChangeListener(int mask, SyncStatusObserver callback); | 17 Object addStatusChangeListener(int mask, SyncStatusObserver callback); |
| 20 | 18 |
| 21 void removeStatusChangeListener(Object handle); | 19 void removeStatusChangeListener(Object handle); |
| 22 | 20 |
| 23 void setMasterSyncAutomatically(boolean sync); | 21 void setMasterSyncAutomatically(boolean sync); |
| 24 | 22 |
| 25 boolean getMasterSyncAutomatically(); | 23 boolean getMasterSyncAutomatically(); |
| 26 | 24 |
| 27 void setSyncAutomatically(Account account, String authority, boolean sync); | 25 void setSyncAutomatically(Account account, String authority, boolean sync); |
| 28 | 26 |
| 29 boolean getSyncAutomatically(Account account, String authority); | 27 boolean getSyncAutomatically(Account account, String authority); |
| 30 | 28 |
| 31 void setIsSyncable(Account account, String authority, int syncable); | 29 void setIsSyncable(Account account, String authority, int syncable); |
| 32 | 30 |
| 33 int getIsSyncable(Account account, String authority); | 31 int getIsSyncable(Account account, String authority); |
| 34 | 32 |
| 35 void removePeriodicSync(Account account, String authority, Bundle extras); | 33 void removePeriodicSync(Account account, String authority, Bundle extras); |
| 36 } | 34 } |
| OLD | NEW |