Chromium Code Reviews| Index: components/autofill/core/browser/region_combobox_model.h |
| diff --git a/components/autofill/core/browser/region_combobox_model.h b/components/autofill/core/browser/region_combobox_model.h |
| index 7d925711724a28698ab49855216d136a784b3464..77b85a274f1cfcc9053545cb5d3b89ef54e194c6 100644 |
| --- a/components/autofill/core/browser/region_combobox_model.h |
| +++ b/components/autofill/core/browser/region_combobox_model.h |
| @@ -36,6 +36,9 @@ class RegionComboboxModel : public ui::ComboboxModel { |
| const std::string& country_code); |
| ~RegionComboboxModel() override; |
| + bool pending_region_data_load() const { return pending_region_data_load_; } |
| + bool failed_to_load_data() const { return failed_to_load_data_; } |
| + |
| // ui::ComboboxModel implementation: |
| int GetItemCount() const override; |
| base::string16 GetItemAt(int index) override; |
| @@ -43,13 +46,20 @@ class RegionComboboxModel : public ui::ComboboxModel { |
| void AddObserver(ui::ComboboxModelObserver* observer) override; |
| void RemoveObserver(ui::ComboboxModelObserver* observer) override; |
| + // To allow testing failure states. |
| + void SetFailureModeForTests(bool failed_to_load_data); |
| + |
| + private: |
| // Callback for ::i18n::addressinput::PreloadSupplier::LoadRules |
| void RegionDataLoaded(bool success, const std::string&, int rule_count); |
| - private: |
| // Whether the region data load failed or not. |
| bool failed_to_load_data_{false}; |
| + // Set to true during region data load, and false otherwise. Whether the load |
| + // succeeded or not doesn't affect this value. |
| + bool pending_region_data_load_{false}; |
|
please use gerrit instead
2017/04/11 21:05:35
Please initialize in the constructor, unless this
MAD
2017/04/12 02:46:08
Here's the thread:
https://groups.google.com/a/chr
|
| + |
| // The application locale. |
| const std::string app_locale_; |