Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/browser/sync/profile_sync_service_android.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698