| 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 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // Starts loading the address validation rules for the specified | 285 // Starts loading the address validation rules for the specified |
| 286 // |region_code|. | 286 // |region_code|. |
| 287 void LoadRulesForRegion( | 287 void LoadRulesForRegion( |
| 288 JNIEnv* env, | 288 JNIEnv* env, |
| 289 const base::android::JavaParamRef<jobject>& unused_obj, | 289 const base::android::JavaParamRef<jobject>& unused_obj, |
| 290 const base::android::JavaParamRef<jstring>& region_code); | 290 const base::android::JavaParamRef<jstring>& region_code); |
| 291 | 291 |
| 292 // Normalizes the address of the profile associated with the |jguid| | 292 // Normalizes the address of the profile associated with the |jguid| |
| 293 // synchronously if the |jregion_code| rules have finished loading. Otherwise | 293 // synchronously if the |jregion_code| rules have finished loading. Otherwise |
| 294 // sets up the task to start the address normalization when the rules have | 294 // sets up the task to start the address normalization when the rules have |
| 295 // finished loading. In either case, sends the normalized profile to the | 295 // finished loading. Also defines a time limit for the normalization, in which |
| 296 // |jdelegate|. | 296 // case the the |jdelegate| will be notified. If the rules are loaded before |
| 297 // the timeout, |jdelegate| will receive the normalized profile. |
| 297 void StartAddressNormalization( | 298 void StartAddressNormalization( |
| 298 JNIEnv* env, | 299 JNIEnv* env, |
| 299 const base::android::JavaParamRef<jobject>& unused_obj, | 300 const base::android::JavaParamRef<jobject>& unused_obj, |
| 300 const base::android::JavaParamRef<jstring>& jguid, | 301 const base::android::JavaParamRef<jstring>& jguid, |
| 301 const base::android::JavaParamRef<jstring>& jregion_code, | 302 const base::android::JavaParamRef<jstring>& jregion_code, |
| 303 jint jtimeout_seconds, |
| 302 const base::android::JavaParamRef<jobject>& jdelegate); | 304 const base::android::JavaParamRef<jobject>& jdelegate); |
| 303 | 305 |
| 304 // Checks whether the Autofill PersonalDataManager has profiles. | 306 // Checks whether the Autofill PersonalDataManager has profiles. |
| 305 jboolean HasProfiles(JNIEnv* env, | 307 jboolean HasProfiles(JNIEnv* env, |
| 306 const base::android::JavaParamRef<jobject>& unused_obj); | 308 const base::android::JavaParamRef<jobject>& unused_obj); |
| 307 | 309 |
| 308 // Checks whether the Autofill PersonalDataManager has credit cards. | 310 // Checks whether the Autofill PersonalDataManager has credit cards. |
| 309 jboolean HasCreditCards( | 311 jboolean HasCreditCards( |
| 310 JNIEnv* env, | 312 JNIEnv* env, |
| 311 const base::android::JavaParamRef<jobject>& unused_obj); | 313 const base::android::JavaParamRef<jobject>& unused_obj); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 361 |
| 360 // The address validator used to normalize addresses. | 362 // The address validator used to normalize addresses. |
| 361 payments::AddressNormalizer address_normalizer_; | 363 payments::AddressNormalizer address_normalizer_; |
| 362 | 364 |
| 363 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); | 365 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); |
| 364 }; | 366 }; |
| 365 | 367 |
| 366 } // namespace autofill | 368 } // namespace autofill |
| 367 | 369 |
| 368 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 370 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| OLD | NEW |