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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 GetSyncEnterCustomPassphraseBodyWithDateText( | 125 GetSyncEnterCustomPassphraseBodyWithDateText( |
126 JNIEnv* env, jobject); | 126 JNIEnv* env, jobject); |
127 | 127 |
128 base::android::ScopedJavaLocalRef<jstring> | 128 base::android::ScopedJavaLocalRef<jstring> |
129 GetSyncEnterCustomPassphraseBodyText( | 129 GetSyncEnterCustomPassphraseBodyText( |
130 JNIEnv* env, jobject); | 130 JNIEnv* env, jobject); |
131 | 131 |
132 // Returns true if sync has been migrated. | 132 // Returns true if sync has been migrated. |
133 jboolean IsSyncKeystoreMigrationDone(JNIEnv* env, jobject obj); | 133 jboolean IsSyncKeystoreMigrationDone(JNIEnv* env, jobject obj); |
134 | 134 |
| 135 // Get the set of enabled data types. These are the types currently both |
| 136 // registered and preferred. Note that control types are always included here. |
| 137 // Returns a bit map of the values from |
| 138 // profile_sync_service_model_type_selection_android.h. |
| 139 jlong GetEnabledDataTypes(JNIEnv* env, jobject obj); |
| 140 |
135 // Enables the passed data types. | 141 // Enables the passed data types. |
136 // If |sync_everything| is true, then all data types are enabled and the | 142 // If |sync_everything| is true, then all data types are enabled and the |
137 // contents of |model_type_selection| is | 143 // contents of |model_type_selection| is |
138 // ignored. | 144 // ignored. |
139 // Otherwise, the values of |model_type_selection| must contain a bit map of | 145 // Otherwise, the values of |model_type_selection| must contain a bit map of |
140 // values from profile_sync_service_model_type_selection_android.h. | 146 // values from profile_sync_service_model_type_selection_android.h. |
141 void SetPreferredDataTypes(JNIEnv* env, | 147 void SetPreferredDataTypes(JNIEnv* env, |
142 jobject obj, | 148 jobject obj, |
143 jboolean sync_everything, | 149 jboolean sync_everything, |
144 jlong model_type_selection); | 150 jlong model_type_selection); |
145 | 151 |
146 // Tells sync that we're currently configuring so no data types should be | 152 // Tells sync that we're currently configuring so no data types should be |
147 // downloaded yet. | 153 // downloaded yet. |
148 void SetSetupInProgress(JNIEnv* env, jobject obj, jboolean in_progress); | 154 void SetSetupInProgress(JNIEnv* env, jobject obj, jboolean in_progress); |
149 | 155 |
150 // Tells sync that sync setup is complete so we can start syncing now. | 156 // Tells sync that sync setup is complete so we can start syncing now. |
151 void SetSyncSetupCompleted(JNIEnv* env, jobject obj); | 157 void SetSyncSetupCompleted(JNIEnv* env, jobject obj); |
152 | 158 |
153 // Returns true if sync setup has been completed. | 159 // Returns true if sync setup has been completed. |
154 jboolean HasSyncSetupCompleted(JNIEnv* env, jobject obj); | 160 jboolean HasSyncSetupCompleted(JNIEnv* env, jobject obj); |
155 | 161 |
156 // Returns true if sync is configured to "sync everything". | 162 // Returns true if sync is configured to "sync everything". |
157 jboolean HasKeepEverythingSynced(JNIEnv* env, jobject obj); | 163 jboolean HasKeepEverythingSynced(JNIEnv* env, jobject obj); |
158 | 164 |
159 // Returns true if the user has autofill sync enabled. | |
160 jboolean IsAutofillSyncEnabled(JNIEnv* env, jobject obj); | |
161 | |
162 // Returns true if the user has bookmark sync enabled. | |
163 jboolean IsBookmarkSyncEnabled(JNIEnv* env, jobject obj); | |
164 | |
165 // Returns true if the user has password sync enabled. | |
166 jboolean IsPasswordSyncEnabled(JNIEnv* env, jobject obj); | |
167 | |
168 // Returns true if the user has typed URL sync enabled. | |
169 jboolean IsTypedUrlSyncEnabled(JNIEnv* env, jobject obj); | |
170 | |
171 // Returns true if the user has session sync enabled. | |
172 jboolean IsSessionSyncEnabled(JNIEnv* env, jobject obj); | |
173 | |
174 // Turns on encryption for all data types. This is an asynchronous operation | 165 // Turns on encryption for all data types. This is an asynchronous operation |
175 // which happens after the current configuration pass is done, so a call to | 166 // which happens after the current configuration pass is done, so a call to |
176 // this routine must be followed by a call to SetEnabledDataTypes(). | 167 // this routine must be followed by a call to SetEnabledDataTypes(). |
177 void EnableEncryptEverything(JNIEnv* env, jobject obj); | 168 void EnableEncryptEverything(JNIEnv* env, jobject obj); |
178 | 169 |
179 // Returns true if sync has encountered an unrecoverable error. | 170 // Returns true if sync has encountered an unrecoverable error. |
180 jboolean HasUnrecoverableError(JNIEnv* env, jobject obj); | 171 jboolean HasUnrecoverableError(JNIEnv* env, jobject obj); |
181 | 172 |
182 // Returns sync internals in a JSON-formatted Java string. | 173 // Returns sync internals in a JSON-formatted Java string. |
183 base::android::ScopedJavaLocalRef<jstring> GetAboutInfoForTest(JNIEnv* env, | 174 base::android::ScopedJavaLocalRef<jstring> GetAboutInfoForTest(JNIEnv* env, |
(...skipping 27 matching lines...) Expand all Loading... |
211 | 202 |
212 // The invalidation API spec allows for the possibility of redundant | 203 // The invalidation API spec allows for the possibility of redundant |
213 // invalidations, so keep track of the max versions and drop | 204 // invalidations, so keep track of the max versions and drop |
214 // invalidations with old versions. | 205 // invalidations with old versions. |
215 std::map<syncer::ModelType, int64> max_invalidation_versions_; | 206 std::map<syncer::ModelType, int64> max_invalidation_versions_; |
216 | 207 |
217 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); | 208 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); |
218 }; | 209 }; |
219 | 210 |
220 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 211 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
OLD | NEW |