| Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
|
| index 9ba6f52c5f78c75da115440d4e7f4e386e1bda39..19212e494ee5dc3a46de6a61e52e459be38fea31 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
|
| @@ -520,7 +520,7 @@ public class PersonalDataManager {
|
| return sManager;
|
| }
|
|
|
| - private static int sNormalizationTimeoutMs = 5000;
|
| + private static int sNormalizationTimeoutSeconds = 5;
|
|
|
| private final long mPersonalDataManagerAndroid;
|
| private final List<PersonalDataManagerObserver> mDataObservers =
|
| @@ -818,12 +818,14 @@ public class PersonalDataManager {
|
| *
|
| * @param guid The GUID of the profile to normalize.
|
| * @param regionCode The region code indicating which rules to use for normalization.
|
| + * @param timeoutSeconds The time limit to get a result for the normalization.
|
| * @param delegate The object requesting the normalization.
|
| */
|
| - public void normalizeAddress(
|
| - String guid, String regionCode, NormalizedAddressRequestDelegate delegate) {
|
| + public void normalizeAddress(String guid, String regionCode, int timeoutSeconds,
|
| + NormalizedAddressRequestDelegate delegate) {
|
| ThreadUtils.assertOnUiThread();
|
| - nativeStartAddressNormalization(mPersonalDataManagerAndroid, guid, regionCode, delegate);
|
| + nativeStartAddressNormalization(
|
| + mPersonalDataManagerAndroid, guid, regionCode, timeoutSeconds, delegate);
|
| }
|
|
|
| /**
|
| @@ -884,13 +886,13 @@ public class PersonalDataManager {
|
| /**
|
| * @return The timeout value for normalization.
|
| */
|
| - public static int getNormalizationTimeoutMS() {
|
| - return sNormalizationTimeoutMs;
|
| + public static int getNormalizationTimeoutSeconds() {
|
| + return sNormalizationTimeoutSeconds;
|
| }
|
|
|
| @VisibleForTesting
|
| public static void setNormalizationTimeoutForTesting(int timeout) {
|
| - sNormalizationTimeoutMs = timeout;
|
| + sNormalizationTimeoutSeconds = timeout;
|
| }
|
|
|
| private native long nativeInit();
|
| @@ -955,7 +957,8 @@ public class PersonalDataManager {
|
| private native void nativeLoadRulesForRegion(
|
| long nativePersonalDataManagerAndroid, String regionCode);
|
| private native void nativeStartAddressNormalization(long nativePersonalDataManagerAndroid,
|
| - String guid, String regionCode, NormalizedAddressRequestDelegate delegate);
|
| + String guid, String regionCode, int timeoutSeconds,
|
| + NormalizedAddressRequestDelegate delegate);
|
| private static native boolean nativeHasProfiles(long nativePersonalDataManagerAndroid);
|
| private static native boolean nativeHasCreditCards(long nativePersonalDataManagerAndroid);
|
| private static native boolean nativeIsAutofillEnabled();
|
|
|