| Index: chrome/browser/chromeos/options/vpn_config_view.cc
|
| diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
|
| index 4f657b5ee0a9902afcc7baef8388407b0aed2a4b..bf8f30f7b0502d4acdd26f8335622cac4b45aab5 100644
|
| --- a/chrome/browser/chromeos/options/vpn_config_view.cc
|
| +++ b/chrome/browser/chromeos/options/vpn_config_view.cc
|
| @@ -56,13 +56,16 @@ class ProviderTypeComboboxModel : public ui::ComboboxModel {
|
| public:
|
| ProviderTypeComboboxModel() {}
|
| virtual ~ProviderTypeComboboxModel() {}
|
| - virtual int GetItemCount() {
|
| +
|
| + // Overridden from ui::ComboboxModel:
|
| + virtual int GetItemCount() const OVERRIDE {
|
| return chromeos::PROVIDER_TYPE_MAX;
|
| }
|
| - virtual string16 GetItemAt(int index) {
|
| + virtual string16 GetItemAt(int index) OVERRIDE {
|
| ProviderType type = static_cast<ProviderType>(index);
|
| return ProviderTypeToString(type);
|
| }
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ProviderTypeComboboxModel);
|
| };
|
| @@ -73,25 +76,28 @@ class ServerCACertComboboxModel : public ui::ComboboxModel {
|
| : cert_library_(cert_library) {
|
| }
|
| virtual ~ServerCACertComboboxModel() {}
|
| - virtual int GetItemCount() {
|
| +
|
| + // Overridden from ui::ComboboxModel:
|
| + virtual int GetItemCount() const OVERRIDE {
|
| if (cert_library_->CertificatesLoading())
|
| return 1; // "Loading"
|
| // "Default" + certs.
|
| return cert_library_->GetCACertificates().Size() + 1;
|
| }
|
| - virtual string16 GetItemAt(int combo_index) {
|
| + virtual string16 GetItemAt(int index) OVERRIDE {
|
| if (cert_library_->CertificatesLoading())
|
| return l10n_util::GetStringUTF16(
|
| IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_LOADING);
|
| - if (combo_index == 0)
|
| + if (index == 0)
|
| return l10n_util::GetStringUTF16(
|
| IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_SERVER_CA_DEFAULT);
|
| - int cert_index = combo_index - 1;
|
| + int cert_index = index - 1;
|
| return cert_library_->GetCACertificates().GetDisplayStringAt(cert_index);
|
| }
|
|
|
| private:
|
| CertLibrary* cert_library_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ServerCACertComboboxModel);
|
| };
|
|
|
| @@ -101,7 +107,9 @@ class UserCertComboboxModel : public ui::ComboboxModel {
|
| : cert_library_(cert_library) {
|
| }
|
| virtual ~UserCertComboboxModel() {}
|
| - virtual int GetItemCount() {
|
| +
|
| + // Overridden from ui::ComboboxModel:
|
| + virtual int GetItemCount() const OVERRIDE {
|
| if (cert_library_->CertificatesLoading())
|
| return 1; // "Loading"
|
| int num_certs = cert_library_->GetUserCertificates().Size();
|
| @@ -109,7 +117,7 @@ class UserCertComboboxModel : public ui::ComboboxModel {
|
| return 1; // "None installed"
|
| return num_certs;
|
| }
|
| - virtual string16 GetItemAt(int combo_index) {
|
| + virtual string16 GetItemAt(int index) OVERRIDE {
|
| if (cert_library_->CertificatesLoading()) {
|
| return l10n_util::GetStringUTF16(
|
| IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_LOADING);
|
| @@ -118,7 +126,7 @@ class UserCertComboboxModel : public ui::ComboboxModel {
|
| return l10n_util::GetStringUTF16(
|
| IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USER_CERT_NONE_INSTALLED);
|
| }
|
| - return cert_library_->GetUserCertificates().GetDisplayStringAt(combo_index);
|
| + return cert_library_->GetUserCertificates().GetDisplayStringAt(index);
|
| }
|
|
|
| private:
|
|
|