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 #include "chrome/browser/sync/profile_sync_service_android.h" | 5 #include "chrome/browser/sync/profile_sync_service_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
195 return sync_service_->backend_initialized(); | 195 return sync_service_->backend_initialized(); |
196 } | 196 } |
197 | 197 |
198 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress( | 198 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress( |
199 JNIEnv* env, jobject) { | 199 JNIEnv* env, jobject) { |
200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
201 return sync_service_->FirstSetupInProgress(); | 201 return sync_service_->FirstSetupInProgress(); |
202 } | 202 } |
203 | 203 |
| 204 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingAllowed( |
| 205 JNIEnv* env, jobject obj) { |
| 206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 207 return sync_service_->EncryptEverythingAllowed(); |
| 208 } |
| 209 |
204 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { | 210 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { |
205 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 211 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
206 return sync_service_->IsPassphraseRequired(); | 212 return sync_service_->IsPassphraseRequired(); |
207 } | 213 } |
208 | 214 |
209 jboolean ProfileSyncServiceAndroid::IsPassphraseRequiredForDecryption( | 215 jboolean ProfileSyncServiceAndroid::IsPassphraseRequiredForDecryption( |
210 JNIEnv* env, jobject obj) { | 216 JNIEnv* env, jobject obj) { |
211 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
212 // In case of CUSTOM_PASSPHRASE we always sync passwords. Prompt the user for | 218 // In case of CUSTOM_PASSPHRASE we always sync passwords. Prompt the user for |
213 // a passphrase if cryptographer has any pending keys. | 219 // a passphrase if cryptographer has any pending keys. |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 ProfileSyncServiceAndroid* profile_sync_service_android = | 510 ProfileSyncServiceAndroid* profile_sync_service_android = |
505 new ProfileSyncServiceAndroid(env, obj); | 511 new ProfileSyncServiceAndroid(env, obj); |
506 profile_sync_service_android->Init(); | 512 profile_sync_service_android->Init(); |
507 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 513 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
508 } | 514 } |
509 | 515 |
510 // static | 516 // static |
511 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 517 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
512 return RegisterNativesImpl(env); | 518 return RegisterNativesImpl(env); |
513 } | 519 } |
OLD | NEW |