| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
| 6 | 6 |
| 7 import android.text.TextUtils; | 7 import android.text.TextUtils; |
| 8 | 8 |
| 9 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; | 9 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; |
| 10 import org.chromium.chrome.browser.payments.ui.PaymentOption; | 10 import org.chromium.chrome.browser.payments.ui.PaymentOption; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 private AutofillProfile mProfile; | 34 private AutofillProfile mProfile; |
| 35 @Nullable private Pattern mLanguageScriptCodePattern; | 35 @Nullable private Pattern mLanguageScriptCodePattern; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Builds the autofill address. | 38 * Builds the autofill address. |
| 39 * | 39 * |
| 40 * @param profile The autofill profile containing the address information. | 40 * @param profile The autofill profile containing the address information. |
| 41 */ | 41 */ |
| 42 public AutofillAddress(AutofillProfile profile, boolean isComplete) { | 42 public AutofillAddress(AutofillProfile profile, boolean isComplete) { |
| 43 super(profile.getGUID(), profile.getFullName(), profile.getLabel(), | 43 super(profile.getGUID(), profile.getFullName(), profile.getLabel(), |
| 44 profile.getPhoneNumber(), PaymentOption.NO_ICON); | 44 profile.getPhoneNumber(), null); |
| 45 mProfile = profile; | 45 mProfile = profile; |
| 46 mIsComplete = isComplete; | 46 mIsComplete = isComplete; |
| 47 } | 47 } |
| 48 | 48 |
| 49 /** @return The autofill profile where this address data lives. */ | 49 /** @return The autofill profile where this address data lives. */ |
| 50 public AutofillProfile getProfile() { | 50 public AutofillProfile getProfile() { |
| 51 return mProfile; | 51 return mProfile; |
| 52 } | 52 } |
| 53 | 53 |
| 54 /** | 54 /** |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 result.scriptCode = ensureNotNull(matcher.group(SCRIPT_CODE_GROUP)); | 103 result.scriptCode = ensureNotNull(matcher.group(SCRIPT_CODE_GROUP)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 return result; | 106 return result; |
| 107 } | 107 } |
| 108 | 108 |
| 109 private static String ensureNotNull(@Nullable String value) { | 109 private static String ensureNotNull(@Nullable String value) { |
| 110 return value == null ? "" : value; | 110 return value == null ? "" : value; |
| 111 } | 111 } |
| 112 } | 112 } |
| OLD | NEW |