| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 sync_service_->RequestStop(ProfileSyncService::CLEAR_DATA); | 165 sync_service_->RequestStop(ProfileSyncService::CLEAR_DATA); |
| 166 } | 166 } |
| 167 | 167 |
| 168 jboolean ProfileSyncServiceAndroid::IsSyncActive( | 168 jboolean ProfileSyncServiceAndroid::IsSyncActive( |
| 169 JNIEnv* env, | 169 JNIEnv* env, |
| 170 const JavaParamRef<jobject>& obj) { | 170 const JavaParamRef<jobject>& obj) { |
| 171 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 171 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 172 return sync_service_->IsSyncActive(); | 172 return sync_service_->IsSyncActive(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 jboolean ProfileSyncServiceAndroid::IsBackendInitialized( | 175 jboolean ProfileSyncServiceAndroid::IsEngineInitialized( |
| 176 JNIEnv* env, | 176 JNIEnv* env, |
| 177 const JavaParamRef<jobject>&) { | 177 const JavaParamRef<jobject>&) { |
| 178 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 178 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 179 return sync_service_->IsBackendInitialized(); | 179 return sync_service_->IsEngineInitialized(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ProfileSyncServiceAndroid::SetSetupInProgress( | 182 void ProfileSyncServiceAndroid::SetSetupInProgress( |
| 183 JNIEnv* env, | 183 JNIEnv* env, |
| 184 const JavaParamRef<jobject>& obj, | 184 const JavaParamRef<jobject>& obj, |
| 185 jboolean in_progress) { | 185 jboolean in_progress) { |
| 186 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 186 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 187 if (in_progress) { | 187 if (in_progress) { |
| 188 sync_blocker_ = sync_service_->GetSetupInProgressHandle(); | 188 sync_blocker_ = sync_service_->GetSetupInProgressHandle(); |
| 189 } else { | 189 } else { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 507 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 508 ProfileSyncServiceAndroid* profile_sync_service_android = | 508 ProfileSyncServiceAndroid* profile_sync_service_android = |
| 509 new ProfileSyncServiceAndroid(env, obj); | 509 new ProfileSyncServiceAndroid(env, obj); |
| 510 if (profile_sync_service_android->Init()) { | 510 if (profile_sync_service_android->Init()) { |
| 511 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 511 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
| 512 } else { | 512 } else { |
| 513 delete profile_sync_service_android; | 513 delete profile_sync_service_android; |
| 514 return 0; | 514 return 0; |
| 515 } | 515 } |
| 516 } | 516 } |
| OLD | NEW |