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

Side by Side Diff: components/signin/core/browser/child_account_info_fetcher_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/signin/core/browser/child_account_info_fetcher_android.h" 5 #include "components/signin/core/browser/child_account_info_fetcher_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 "components/signin/core/browser/account_fetcher_service.h" 9 #include "components/signin/core/browser/account_fetcher_service.h"
10 #include "jni/ChildAccountInfoFetcher_jni.h" 10 #include "jni/ChildAccountInfoFetcher_jni.h"
(...skipping 15 matching lines...) Expand all
26 bool is_child_account) { 26 bool is_child_account) {
27 service->SetIsChildAccount(account_id, is_child_account); 27 service->SetIsChildAccount(account_id, is_child_account);
28 } 28 }
29 29
30 // static 30 // static
31 bool ChildAccountInfoFetcherAndroid::Register(JNIEnv* env) { 31 bool ChildAccountInfoFetcherAndroid::Register(JNIEnv* env) {
32 return RegisterNativesImpl(env); 32 return RegisterNativesImpl(env);
33 } 33 }
34 34
35 void SetIsChildAccount(JNIEnv* env, 35 void SetIsChildAccount(JNIEnv* env,
36 jclass caller, 36 const JavaParamRef<jclass>& caller,
37 jlong native_service, 37 jlong native_service,
38 jstring j_account_id, 38 const JavaParamRef<jstring>& j_account_id,
39 jboolean is_child_account) { 39 jboolean is_child_account) {
40 AccountFetcherService* service = 40 AccountFetcherService* service =
41 reinterpret_cast<AccountFetcherService*>(native_service); 41 reinterpret_cast<AccountFetcherService*>(native_service);
42 ChildAccountInfoFetcherAndroid::SetIsChildAccount( 42 ChildAccountInfoFetcherAndroid::SetIsChildAccount(
43 service, base::android::ConvertJavaStringToUTF8(env, j_account_id), 43 service, base::android::ConvertJavaStringToUTF8(env, j_account_id),
44 is_child_account); 44 is_child_account);
45 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698