Chromium Code Reviews| Index: components/payments/address_normalizer.h |
| diff --git a/components/payments/address_normalizer.h b/components/payments/address_normalizer.h |
| index d2f24c58e6896fa38adff7598df6a2a3aff1d2d2..767ff95ee4d5e7e2dfb011aa40824902c056b3ab 100644 |
| --- a/components/payments/address_normalizer.h |
| +++ b/components/payments/address_normalizer.h |
| @@ -6,7 +6,6 @@ |
| #define COMPONENTS_PAYMENTS_ADDRESS_NORMALIZER_H_ |
| #include "base/macros.h" |
| -#include "base/memory/weak_ptr.h" |
| #include "components/autofill/core/browser/autofill_profile.h" |
| #include "third_party/libaddressinput/chromium/chrome_address_validator.h" |
| @@ -15,8 +14,7 @@ using autofill::AutofillProfile; |
| namespace payments { |
| // A class used to normalize addresses. |
| -class AddressNormalizer : public autofill::LoadRulesListener, |
| - public base::SupportsWeakPtr<AddressNormalizer> { |
| +class AddressNormalizer : public autofill::LoadRulesListener { |
| public: |
| // The interface for the normalization delegates. |
| class Delegate { |
| @@ -43,7 +41,7 @@ class AddressNormalizer : public autofill::LoadRulesListener, |
| ~AddressNormalizer() override; |
| // Start loading the validation rules for the specified |region_code|. |
| - void LoadRulesForRegion(const std::string& region_code); |
| + virtual void LoadRulesForRegion(const std::string& region_code); |
| // Returns whether the rules for the specified |region_code| have finished |
| // loading. |
| @@ -51,9 +49,14 @@ class AddressNormalizer : public autofill::LoadRulesListener, |
| // Starts the normalization of the |profile| based on the |region_code|. The |
| // normalized profile will be returned to the |requester| possibly |
| - // asynchronously. |
| + // asynchronously. If the normalization is not completed in |timeout_seconds| |
| + // the requested will be informed and the request cancelled. This value should |
|
please use gerrit instead
2017/02/21 17:15:13
s/requested/requester/
sebsg
2017/02/21 18:30:59
Done.
|
| + // be greated or equal to 0, for which it means that the normalization should |
|
please use gerrit instead
2017/02/21 17:15:12
s/greated or equal to/at least/
sebsg
2017/02/21 18:30:59
Done.
|
| + // happen synchronously, or not at all. Will start loading the rules for the |
|
please use gerrit instead
2017/02/21 17:15:13
Please explain why 0 could be no normalization at
sebsg
2017/02/21 18:30:59
Done.
|
| + // |region_code| if they had not started loading. |
| void StartAddressNormalization(const autofill::AutofillProfile& profile, |
| const std::string& region_code, |
| + int timeout_seconds, |
| Delegate* requester); |
| private: |