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

Side by Side Diff: components/signin/core/browser/child_account_info_fetcher_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "components/signin/core/browser/account_tracker_service.h" 10 #include "components/signin/core/browser/account_tracker_service.h"
11 #include "jni/ChildAccountInfoFetcher_jni.h" 11 #include "jni/ChildAccountInfoFetcher_jni.h"
12 12
13 using base::android::JavaParamRef;
14
13 // static 15 // static
14 void ChildAccountInfoFetcherAndroid::StartFetchingChildAccountInfo( 16 void ChildAccountInfoFetcherAndroid::StartFetchingChildAccountInfo(
15 AccountFetcherService* service, 17 AccountFetcherService* service,
16 const std::string& account_id) { 18 const std::string& account_id) {
17 JNIEnv* env = base::android::AttachCurrentThread(); 19 JNIEnv* env = base::android::AttachCurrentThread();
18 std::string account_name = 20 std::string account_name =
19 service->account_tracker_service()->GetAccountInfo(account_id).email; 21 service->account_tracker_service()->GetAccountInfo(account_id).email;
20 // The AccountTrackerService may not be populated correctly in tests. 22 // The AccountTrackerService may not be populated correctly in tests.
21 if (account_name.empty()) 23 if (account_name.empty())
22 return; 24 return;
(...skipping 12 matching lines...) Expand all
35 const JavaParamRef<jclass>& caller, 37 const JavaParamRef<jclass>& caller,
36 jlong native_service, 38 jlong native_service,
37 const JavaParamRef<jstring>& j_account_id, 39 const JavaParamRef<jstring>& j_account_id,
38 jboolean is_child_account) { 40 jboolean is_child_account) {
39 AccountFetcherService* service = 41 AccountFetcherService* service =
40 reinterpret_cast<AccountFetcherService*>(native_service); 42 reinterpret_cast<AccountFetcherService*>(native_service);
41 service->SetIsChildAccount( 43 service->SetIsChildAccount(
42 base::android::ConvertJavaStringToUTF8(env, j_account_id), 44 base::android::ConvertJavaStringToUTF8(env, j_account_id),
43 is_child_account); 45 is_child_account);
44 } 46 }
OLDNEW
« no previous file with comments | « components/safe_json/json_sanitizer_android.cc ('k') | components/sync/android/model_type_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698