| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingEnabled( | 171 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingEnabled( |
| 172 JNIEnv* env, jobject) { | 172 JNIEnv* env, jobject) { |
| 173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 174 return sync_service_->EncryptEverythingEnabled(); | 174 return sync_service_->EncryptEverythingEnabled(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 jboolean ProfileSyncServiceAndroid::IsSyncInitialized(JNIEnv* env, jobject) { | 177 jboolean ProfileSyncServiceAndroid::IsSyncInitialized(JNIEnv* env, jobject) { |
| 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 179 return sync_service_->SyncActive(); | 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::IsPassphraseRequired(JNIEnv* env, jobject) { | 188 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { |
| 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 ProfileSyncServiceAndroid* profile_sync_service_android = | 488 ProfileSyncServiceAndroid* profile_sync_service_android = |
| 489 new ProfileSyncServiceAndroid(env, obj); | 489 new ProfileSyncServiceAndroid(env, obj); |
| 490 profile_sync_service_android->Init(); | 490 profile_sync_service_android->Init(); |
| 491 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 491 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
| 492 } | 492 } |
| 493 | 493 |
| 494 // static | 494 // static |
| 495 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 495 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
| 496 return RegisterNativesImpl(env); | 496 return RegisterNativesImpl(env); |
| 497 } | 497 } |
| OLD | NEW |