Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4998)

Unified Diff: chrome/browser/ui/autofill/country_combobox_model.h

Issue 2705773002: [Autofill] Move country combo box model from chrome to component. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/autofill/country_combobox_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/country_combobox_model.h
diff --git a/chrome/browser/ui/autofill/country_combobox_model.h b/chrome/browser/ui/autofill/country_combobox_model.h
deleted file mode 100644
index d7e25a6a0c2b021d83ba3b0a7c9f5a076b70a57c..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/autofill/country_combobox_model.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_AUTOFILL_COUNTRY_COMBOBOX_MODEL_H_
-#define CHROME_BROWSER_UI_AUTOFILL_COUNTRY_COMBOBOX_MODEL_H_
-
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
-#include "ui/base/models/combobox_model.h"
-
-namespace autofill {
-
-class AutofillCountry;
-class PersonalDataManager;
-
-// A model for countries to be used to enter addresses.
-class CountryComboboxModel : public ui::ComboboxModel {
- public:
- using CountryVector = std::vector<std::unique_ptr<AutofillCountry>>;
-
- CountryComboboxModel();
- ~CountryComboboxModel() override;
-
- // |filter| is passed each known country's country code. If |filter| returns
- // true, an item for that country is added to the model (else it's omitted).
- // |manager| determines the default choice.
- void SetCountries(const PersonalDataManager& manager,
- const base::Callback<bool(const std::string&)>& filter);
-
- // ui::ComboboxModel implementation:
- int GetItemCount() const override;
- base::string16 GetItemAt(int index) override;
- bool IsItemSeparatorAt(int index) override;
-
- const CountryVector& countries() const { return countries_; }
-
- // Returns the default country code for this model.
- std::string GetDefaultCountryCode() const;
-
- private:
- // The countries to show in the model, including NULL for entries that are
- // not countries (the separator entry).
- CountryVector countries_;
-
- DISALLOW_COPY_AND_ASSIGN(CountryComboboxModel);
-};
-
-} // namespace autofill
-
-#endif // CHROME_BROWSER_UI_AUTOFILL_COUNTRY_COMBOBOX_MODEL_H_
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/autofill/country_combobox_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698