| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 179 return sync_service_->backend_initialized(); | 179 return sync_service_->backend_initialized(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress( | 182 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress( |
| 183 JNIEnv* env, jobject) { | 183 JNIEnv* env, jobject) { |
| 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 185 return sync_service_->FirstSetupInProgress(); | 185 return sync_service_->FirstSetupInProgress(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingAllowed( |
| 189 JNIEnv* env, jobject obj) { |
| 190 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 191 return sync_service_->EncryptEverythingAllowed(); |
| 192 } |
| 193 |
| 188 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { | 194 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { |
| 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 195 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 190 return sync_service_->IsPassphraseRequired(); | 196 return sync_service_->IsPassphraseRequired(); |
| 191 } | 197 } |
| 192 | 198 |
| 193 jboolean ProfileSyncServiceAndroid::IsPassphraseRequiredForDecryption( | 199 jboolean ProfileSyncServiceAndroid::IsPassphraseRequiredForDecryption( |
| 194 JNIEnv* env, jobject obj) { | 200 JNIEnv* env, jobject obj) { |
| 195 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 201 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 196 // In case of CUSTOM_PASSPHRASE we always sync passwords. Prompt the user for | 202 // In case of CUSTOM_PASSPHRASE we always sync passwords. Prompt the user for |
| 197 // a passphrase if cryptographer has any pending keys. | 203 // a passphrase if cryptographer has any pending keys. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 ProfileSyncServiceAndroid* profile_sync_service_android = | 494 ProfileSyncServiceAndroid* profile_sync_service_android = |
| 489 new ProfileSyncServiceAndroid(env, obj); | 495 new ProfileSyncServiceAndroid(env, obj); |
| 490 profile_sync_service_android->Init(); | 496 profile_sync_service_android->Init(); |
| 491 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 497 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
| 492 } | 498 } |
| 493 | 499 |
| 494 // static | 500 // static |
| 495 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 501 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
| 496 return RegisterNativesImpl(env); | 502 return RegisterNativesImpl(env); |
| 497 } | 503 } |
| OLD | NEW |