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 org.json.JSONArray; | 7 import org.json.JSONArray; |
8 import org.json.JSONException; | 8 import org.json.JSONException; |
9 | 9 |
10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 private static final int[] ALL_SELECTABLE_TYPES = new int[] { | 69 private static final int[] ALL_SELECTABLE_TYPES = new int[] { |
70 ModelType.AUTOFILL, | 70 ModelType.AUTOFILL, |
71 ModelType.BOOKMARKS, | 71 ModelType.BOOKMARKS, |
72 ModelType.PASSWORDS, | 72 ModelType.PASSWORDS, |
73 ModelType.PREFERENCES, | 73 ModelType.PREFERENCES, |
74 ModelType.PROXY_TABS, | 74 ModelType.PROXY_TABS, |
75 ModelType.TYPED_URLS | 75 ModelType.TYPED_URLS |
76 }; | 76 }; |
77 | 77 |
78 private static ProfileSyncService sProfileSyncService; | 78 private static ProfileSyncService sProfileSyncService; |
79 private static boolean sInitialized = false; | 79 private static boolean sInitialized; |
80 | 80 |
81 // Sync state changes more often than listeners are added/removed, so using
CopyOnWrite. | 81 // Sync state changes more often than listeners are added/removed, so using
CopyOnWrite. |
82 private final List<SyncStateChangedListener> mListeners = | 82 private final List<SyncStateChangedListener> mListeners = |
83 new CopyOnWriteArrayList<SyncStateChangedListener>(); | 83 new CopyOnWriteArrayList<SyncStateChangedListener>(); |
84 | 84 |
85 /** | 85 /** |
86 * Native ProfileSyncServiceAndroid object. Cannot be final because it is in
itialized in | 86 * Native ProfileSyncServiceAndroid object. Cannot be final because it is in
itialized in |
87 * {@link init()}. | 87 * {@link init()}. |
88 */ | 88 */ |
89 private long mNativeProfileSyncServiceAndroid; | 89 private long mNativeProfileSyncServiceAndroid; |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 private native boolean nativeIsPassphrasePrompted(long nativeProfileSyncServ
iceAndroid); | 585 private native boolean nativeIsPassphrasePrompted(long nativeProfileSyncServ
iceAndroid); |
586 private native void nativeSetPassphrasePrompted(long nativeProfileSyncServic
eAndroid, | 586 private native void nativeSetPassphrasePrompted(long nativeProfileSyncServic
eAndroid, |
587 boolean prompted); | 587 boolean prompted); |
588 private native String nativeGetAboutInfoForTest(long nativeProfileSyncServic
eAndroid); | 588 private native String nativeGetAboutInfoForTest(long nativeProfileSyncServic
eAndroid); |
589 private native long nativeGetLastSyncedTimeForTest(long nativeProfileSyncSer
viceAndroid); | 589 private native long nativeGetLastSyncedTimeForTest(long nativeProfileSyncSer
viceAndroid); |
590 private native void nativeOverrideNetworkResourcesForTest( | 590 private native void nativeOverrideNetworkResourcesForTest( |
591 long nativeProfileSyncServiceAndroid, long networkResources); | 591 long nativeProfileSyncServiceAndroid, long networkResources); |
592 private native void nativeGetAllNodes( | 592 private native void nativeGetAllNodes( |
593 long nativeProfileSyncServiceAndroid, GetAllNodesCallback callback); | 593 long nativeProfileSyncServiceAndroid, GetAllNodesCallback callback); |
594 } | 594 } |
OLD | NEW |