| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 } | 494 } |
| 495 | 495 |
| 496 // static | 496 // static |
| 497 ProfileSyncServiceAndroid* | 497 ProfileSyncServiceAndroid* |
| 498 ProfileSyncServiceAndroid::GetProfileSyncServiceAndroid() { | 498 ProfileSyncServiceAndroid::GetProfileSyncServiceAndroid() { |
| 499 return reinterpret_cast<ProfileSyncServiceAndroid*>( | 499 return reinterpret_cast<ProfileSyncServiceAndroid*>( |
| 500 Java_ProfileSyncService_getProfileSyncServiceAndroid( | 500 Java_ProfileSyncService_getProfileSyncServiceAndroid( |
| 501 AttachCurrentThread(), base::android::GetApplicationContext())); | 501 AttachCurrentThread(), base::android::GetApplicationContext())); |
| 502 } | 502 } |
| 503 | 503 |
| 504 static int Init(JNIEnv* env, jobject obj) { | 504 static jlong Init(JNIEnv* env, jobject obj) { |
| 505 ProfileSyncServiceAndroid* profile_sync_service_android = | 505 ProfileSyncServiceAndroid* profile_sync_service_android = |
| 506 new ProfileSyncServiceAndroid(env, obj); | 506 new ProfileSyncServiceAndroid(env, obj); |
| 507 profile_sync_service_android->Init(); | 507 profile_sync_service_android->Init(); |
| 508 return reinterpret_cast<jint>(profile_sync_service_android); | 508 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
| 509 } | 509 } |
| 510 | 510 |
| 511 // static | 511 // static |
| 512 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 512 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
| 513 return RegisterNativesImpl(env); | 513 return RegisterNativesImpl(env); |
| 514 } | 514 } |
| OLD | NEW |