diff options
author | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 08:21:23 +0000 |
---|---|---|
committer | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 08:21:23 +0000 |
commit | d0f6d663009fed0f2737e1551f10ee9edf05c192 (patch) | |
tree | 43ccffb24d26fc7f0e0ac6de8ba74d1c74218350 /chrome/browser/chromeos/options | |
parent | 503fd3f68383e21fedc0ea8d573add7bdfd5a31c (diff) | |
download | chromium_src-d0f6d663009fed0f2737e1551f10ee9edf05c192.zip chromium_src-d0f6d663009fed0f2737e1551f10ee9edf05c192.tar.gz chromium_src-d0f6d663009fed0f2737e1551f10ee9edf05c192.tar.bz2 |
Moved onc_constants.* from chromeos/network/onc to components/onc.
BUG=267667
Review URL: https://codereview.chromium.org/24600003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options')
5 files changed, 37 insertions, 36 deletions
diff --git a/chrome/browser/chromeos/options/network_property_ui_data.h b/chrome/browser/chromeos/options/network_property_ui_data.h index a8ef5cb..10db2d7 100644 --- a/chrome/browser/chromeos/options/network_property_ui_data.h +++ b/chrome/browser/chromeos/options/network_property_ui_data.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" namespace base { class DictionaryValue; @@ -27,25 +27,25 @@ class NetworkPropertyUIData { NetworkPropertyUIData(); // Initializes with the given |onc_source| and no default value. - explicit NetworkPropertyUIData(onc::ONCSource onc_source); + explicit NetworkPropertyUIData(::onc::ONCSource onc_source); ~NetworkPropertyUIData(); // Update the property object from dictionary, reading the key given by // |property_key|. - void ParseOncProperty(onc::ONCSource onc_source, + void ParseOncProperty(::onc::ONCSource onc_source, const base::DictionaryValue* onc, const std::string& property_key); const base::Value* default_value() const { return default_value_.get(); } bool IsManaged() const { - return (onc_source_ == onc::ONC_SOURCE_DEVICE_POLICY || - onc_source_ == onc::ONC_SOURCE_USER_POLICY); + return (onc_source_ == ::onc::ONC_SOURCE_DEVICE_POLICY || + onc_source_ == ::onc::ONC_SOURCE_USER_POLICY); } bool IsEditable() const { return !IsManaged(); } private: - onc::ONCSource onc_source_; + ::onc::ONCSource onc_source_; scoped_ptr<base::Value> default_value_; DISALLOW_COPY_AND_ASSIGN(NetworkPropertyUIData); diff --git a/chrome/browser/chromeos/options/network_property_ui_data_unittest.cc b/chrome/browser/chromeos/options/network_property_ui_data_unittest.cc index ee47250..4110b78 100644 --- a/chrome/browser/chromeos/options/network_property_ui_data_unittest.cc +++ b/chrome/browser/chromeos/options/network_property_ui_data_unittest.cc @@ -5,7 +5,7 @@ #include "chrome/browser/chromeos/options/network_property_ui_data.h" #include "base/values.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" #include "testing/gtest/include/gtest/gtest.h" namespace chromeos { diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc index 10b13d9..3bde579 100644 --- a/chrome/browser/chromeos/options/vpn_config_view.cc +++ b/chrome/browser/chromeos/options/vpn_config_view.cc @@ -18,7 +18,7 @@ #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_ui_data.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -84,9 +84,9 @@ std::string ProviderTypeIndexToONCDictKey(int provider_type_index) { switch (provider_type_index) { case PROVIDER_TYPE_INDEX_L2TP_IPSEC_PSK: case PROVIDER_TYPE_INDEX_L2TP_IPSEC_USER_CERT: - return chromeos::onc::vpn::kIPsec; + return onc::vpn::kIPsec; case PROVIDER_TYPE_INDEX_OPEN_VPN: - return chromeos::onc::vpn::kOpenVPN; + return onc::vpn::kOpenVPN; } NOTREACHED() << "Unhandled provider type index " << provider_type_index; return std::string(); @@ -766,27 +766,27 @@ void VPNConfigView::ParseUIProperties(const NetworkState* vpn) { std::string type_dict_name = ProviderTypeIndexToONCDictKey(provider_type_index_); if (provider_type_index_ == PROVIDER_TYPE_INDEX_L2TP_IPSEC_PSK) { - ParseVPNUIProperty(vpn, type_dict_name, onc::ipsec::kServerCARef, + ParseVPNUIProperty(vpn, type_dict_name, ::onc::ipsec::kServerCARef, &ca_cert_ui_data_); - ParseVPNUIProperty(vpn, type_dict_name, onc::ipsec::kPSK, + ParseVPNUIProperty(vpn, type_dict_name, ::onc::ipsec::kPSK, &psk_passphrase_ui_data_); - ParseVPNUIProperty(vpn, type_dict_name, onc::ipsec::kGroup, + ParseVPNUIProperty(vpn, type_dict_name, ::onc::ipsec::kGroup, &group_name_ui_data_); } else if (provider_type_index_ == PROVIDER_TYPE_INDEX_OPEN_VPN) { - ParseVPNUIProperty(vpn, type_dict_name, onc::openvpn::kServerCARef, + ParseVPNUIProperty(vpn, type_dict_name, ::onc::openvpn::kServerCARef, &ca_cert_ui_data_); } - ParseVPNUIProperty(vpn, type_dict_name, onc::vpn::kClientCertRef, + ParseVPNUIProperty(vpn, type_dict_name, ::onc::vpn::kClientCertRef, &user_cert_ui_data_); const std::string credentials_dict_name( provider_type_index_ == PROVIDER_TYPE_INDEX_L2TP_IPSEC_PSK ? - onc::vpn::kL2TP : type_dict_name); - ParseVPNUIProperty(vpn, credentials_dict_name, onc::vpn::kUsername, + ::onc::vpn::kL2TP : type_dict_name); + ParseVPNUIProperty(vpn, credentials_dict_name, ::onc::vpn::kUsername, &username_ui_data_); - ParseVPNUIProperty(vpn, credentials_dict_name, onc::vpn::kPassword, + ParseVPNUIProperty(vpn, credentials_dict_name, ::onc::vpn::kPassword, &user_passphrase_ui_data_); - ParseVPNUIProperty(vpn, credentials_dict_name, onc::vpn::kSaveCredentials, + ParseVPNUIProperty(vpn, credentials_dict_name, ::onc::vpn::kSaveCredentials, &save_credentials_ui_data_); } @@ -1045,7 +1045,7 @@ void VPNConfigView::ParseVPNUIProperty( const std::string& dict_key, const std::string& key, NetworkPropertyUIData* property_ui_data) { - onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; + ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; const base::DictionaryValue* onc = onc::FindPolicyForActiveUser(network->guid(), &onc_source); @@ -1054,7 +1054,7 @@ void VPNConfigView::ParseVPNUIProperty( onc_source, onc, base::StringPrintf("%s.%s.%s", - onc::network_config::kVPN, + ::onc::network_config::kVPN, dict_key.c_str(), key.c_str())); } diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc index 05cb496..9e93cf7 100644 --- a/chrome/browser/chromeos/options/wifi_config_view.cc +++ b/chrome/browser/chromeos/options/wifi_config_view.cc @@ -19,7 +19,7 @@ #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_ui_data.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -880,24 +880,25 @@ void WifiConfigView::Init(bool show_8021x) { DCHECK(wifi->type() == shill::kTypeWifi); if (wifi->security() == shill::kSecurity8021x) show_8021x = true; - ParseWiFiEAPUIProperty(&eap_method_ui_data_, wifi, onc::eap::kOuter); - ParseWiFiEAPUIProperty(&phase_2_auth_ui_data_, wifi, onc::eap::kInner); - ParseWiFiEAPUIProperty(&user_cert_ui_data_, wifi, onc::eap::kClientCertRef); + ParseWiFiEAPUIProperty(&eap_method_ui_data_, wifi, ::onc::eap::kOuter); + ParseWiFiEAPUIProperty(&phase_2_auth_ui_data_, wifi, ::onc::eap::kInner); + ParseWiFiEAPUIProperty(&user_cert_ui_data_, wifi, + ::onc::eap::kClientCertRef); ParseWiFiEAPUIProperty(&server_ca_cert_ui_data_, wifi, - onc::eap::kServerCARef); + ::onc::eap::kServerCARef); if (server_ca_cert_ui_data_.IsManaged()) { ParseWiFiEAPUIProperty(&server_ca_cert_ui_data_, wifi, - onc::eap::kUseSystemCAs); + ::onc::eap::kUseSystemCAs); } - ParseWiFiEAPUIProperty(&identity_ui_data_, wifi, onc::eap::kIdentity); + ParseWiFiEAPUIProperty(&identity_ui_data_, wifi, ::onc::eap::kIdentity); ParseWiFiEAPUIProperty(&identity_anonymous_ui_data_, wifi, - onc::eap::kAnonymousIdentity); + ::onc::eap::kAnonymousIdentity); ParseWiFiEAPUIProperty(&save_credentials_ui_data_, wifi, - onc::eap::kSaveCredentials); + ::onc::eap::kSaveCredentials); if (show_8021x) - ParseWiFiEAPUIProperty(&passphrase_ui_data_, wifi, onc::eap::kPassword); + ParseWiFiEAPUIProperty(&passphrase_ui_data_, wifi, ::onc::eap::kPassword); else - ParseWiFiUIProperty(&passphrase_ui_data_, wifi, onc::wifi::kPassphrase); + ParseWiFiUIProperty(&passphrase_ui_data_, wifi, ::onc::wifi::kPassphrase); } views::GridLayout* layout = views::GridLayout::CreatePanel(this); @@ -1319,14 +1320,14 @@ void WifiConfigView::ParseWiFiUIProperty( NetworkPropertyUIData* property_ui_data, const NetworkState* network, const std::string& key) { - onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; + ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; const base::DictionaryValue* onc = onc::FindPolicyForActiveUser(network->guid(), &onc_source); property_ui_data->ParseOncProperty( onc_source, onc, - base::StringPrintf("%s.%s", onc::network_config::kWiFi, key.c_str())); + base::StringPrintf("%s.%s", ::onc::network_config::kWiFi, key.c_str())); } // static @@ -1336,7 +1337,7 @@ void WifiConfigView::ParseWiFiEAPUIProperty( const std::string& key) { ParseWiFiUIProperty( property_ui_data, network, - base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); + base::StringPrintf("%s.%s", ::onc::wifi::kEAP, key.c_str())); } } // namespace chromeos diff --git a/chrome/browser/chromeos/options/wimax_config_view.cc b/chrome/browser/chromeos/options/wimax_config_view.cc index 5e99227..b197935 100644 --- a/chrome/browser/chromeos/options/wimax_config_view.cc +++ b/chrome/browser/chromeos/options/wimax_config_view.cc @@ -18,7 +18,7 @@ #include "chromeos/network/network_profile_handler.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" |