| 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_array.h" | 8 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 } | 457 } |
| 458 | 458 |
| 459 // static | 459 // static |
| 460 ProfileSyncServiceAndroid* | 460 ProfileSyncServiceAndroid* |
| 461 ProfileSyncServiceAndroid::GetProfileSyncServiceAndroid() { | 461 ProfileSyncServiceAndroid::GetProfileSyncServiceAndroid() { |
| 462 return reinterpret_cast<ProfileSyncServiceAndroid*>( | 462 return reinterpret_cast<ProfileSyncServiceAndroid*>( |
| 463 Java_ProfileSyncService_getProfileSyncServiceAndroid( | 463 Java_ProfileSyncService_getProfileSyncServiceAndroid( |
| 464 AttachCurrentThread())); | 464 AttachCurrentThread())); |
| 465 } | 465 } |
| 466 | 466 |
| 467 static jlong Init(JNIEnv* env, jobject obj) { | 467 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 468 ProfileSyncServiceAndroid* profile_sync_service_android = | 468 ProfileSyncServiceAndroid* profile_sync_service_android = |
| 469 new ProfileSyncServiceAndroid(env, obj); | 469 new ProfileSyncServiceAndroid(env, obj); |
| 470 profile_sync_service_android->Init(); | 470 profile_sync_service_android->Init(); |
| 471 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 471 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
| 472 } | 472 } |
| 473 | 473 |
| 474 // static | 474 // static |
| 475 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 475 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
| 476 return RegisterNativesImpl(env); | 476 return RegisterNativesImpl(env); |
| 477 } | 477 } |
| OLD | NEW |