| 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/autofill/android/personal_data_manager_android.h" | 5 #include "chrome/browser/autofill/android/personal_data_manager_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 private: | 304 private: |
| 305 ~AndroidAddressNormalizerDelegate() override {} | 305 ~AndroidAddressNormalizerDelegate() override {} |
| 306 | 306 |
| 307 ScopedJavaGlobalRef<jobject> jdelegate_; | 307 ScopedJavaGlobalRef<jobject> jdelegate_; |
| 308 | 308 |
| 309 DISALLOW_COPY_AND_ASSIGN(AndroidAddressNormalizerDelegate); | 309 DISALLOW_COPY_AND_ASSIGN(AndroidAddressNormalizerDelegate); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 void OnSubKeysReceived(ScopedJavaGlobalRef<jobject> jdelegate, | 312 void OnSubKeysReceived(ScopedJavaGlobalRef<jobject> jdelegate, |
| 313 const std::vector<std::string>& sub_keys) { | 313 const std::vector<std::string>& subkeys_codes, |
| 314 const std::vector<std::string>& subkeys_names) { |
| 314 JNIEnv* env = base::android::AttachCurrentThread(); | 315 JNIEnv* env = base::android::AttachCurrentThread(); |
| 315 Java_GetSubKeysRequestDelegate_onSubKeysReceived( | 316 Java_GetSubKeysRequestDelegate_onSubKeysReceived( |
| 316 env, jdelegate, base::android::ToJavaArrayOfStrings(env, sub_keys)); | 317 env, jdelegate, base::android::ToJavaArrayOfStrings(env, subkeys_codes), |
| 318 base::android::ToJavaArrayOfStrings(env, subkeys_names)); |
| 317 } | 319 } |
| 318 | 320 |
| 319 } // namespace | 321 } // namespace |
| 320 | 322 |
| 321 PersonalDataManagerAndroid::PersonalDataManagerAndroid(JNIEnv* env, jobject obj) | 323 PersonalDataManagerAndroid::PersonalDataManagerAndroid(JNIEnv* env, jobject obj) |
| 322 : weak_java_obj_(env, obj), | 324 : weak_java_obj_(env, obj), |
| 323 personal_data_manager_(PersonalDataManagerFactory::GetForProfile( | 325 personal_data_manager_(PersonalDataManagerFactory::GetForProfile( |
| 324 ProfileManager::GetActiveUserProfile())), | 326 ProfileManager::GetActiveUserProfile())), |
| 325 address_normalizer_( | 327 address_normalizer_( |
| 326 std::unique_ptr<::i18n::addressinput::Source>( | 328 std::unique_ptr<::i18n::addressinput::Source>( |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 base::android::ConvertJavaStringToUTF16(env, jcountry_name))); | 918 base::android::ConvertJavaStringToUTF16(env, jcountry_name))); |
| 917 } | 919 } |
| 918 | 920 |
| 919 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 921 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 920 PersonalDataManagerAndroid* personal_data_manager_android = | 922 PersonalDataManagerAndroid* personal_data_manager_android = |
| 921 new PersonalDataManagerAndroid(env, obj); | 923 new PersonalDataManagerAndroid(env, obj); |
| 922 return reinterpret_cast<intptr_t>(personal_data_manager_android); | 924 return reinterpret_cast<intptr_t>(personal_data_manager_android); |
| 923 } | 925 } |
| 924 | 926 |
| 925 } // namespace autofill | 927 } // namespace autofill |
| OLD | NEW |