diff options
Diffstat (limited to 'chrome')
30 files changed, 155 insertions, 138 deletions
diff --git a/chrome/browser/chromeos/DEPS b/chrome/browser/chromeos/DEPS index 52ada1a..9eab34c 100644 --- a/chrome/browser/chromeos/DEPS +++ b/chrome/browser/chromeos/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+components/onc", "+cros", "+dbus", "+device/bluetooth", diff --git a/chrome/browser/chromeos/net/onc_utils.cc b/chrome/browser/chromeos/net/onc_utils.cc index a92e2ff..4a52464 100644 --- a/chrome/browser/chromeos/net/onc_utils.cc +++ b/chrome/browser/chromeos/net/onc_utils.cc @@ -42,12 +42,12 @@ net::ProxyServer ConvertOncProxyLocationToHostPort( net::ProxyServer::Scheme default_proxy_scheme, const base::DictionaryValue& onc_proxy_location) { std::string host; - onc_proxy_location.GetStringWithoutPathExpansion(onc::proxy::kHost, &host); + onc_proxy_location.GetStringWithoutPathExpansion(::onc::proxy::kHost, &host); // Parse |host| according to the format [<scheme>"://"]<server>[":"<port>]. net::ProxyServer proxy_server = net::ProxyServer::FromURI(host, default_proxy_scheme); int port = 0; - onc_proxy_location.GetIntegerWithoutPathExpansion(onc::proxy::kPort, &port); + onc_proxy_location.GetIntegerWithoutPathExpansion(::onc::proxy::kPort, &port); // Replace the port parsed from |host| by the provided |port|. return net::ProxyServer( @@ -68,13 +68,13 @@ void AppendProxyServerForScheme( net::ProxyServer::Scheme default_proxy_scheme = net::ProxyServer::SCHEME_HTTP; std::string url_scheme; - if (onc_scheme == proxy::kFtp) { + if (onc_scheme == ::onc::proxy::kFtp) { url_scheme = "ftp"; - } else if (onc_scheme == proxy::kHttp) { + } else if (onc_scheme == ::onc::proxy::kHttp) { url_scheme = "http"; - } else if (onc_scheme == proxy::kHttps) { + } else if (onc_scheme == ::onc::proxy::kHttps) { url_scheme = "https"; - } else if (onc_scheme == proxy::kSocks) { + } else if (onc_scheme == ::onc::proxy::kSocks) { default_proxy_scheme = net::ProxyServer::SCHEME_SOCKS4; url_scheme = "socks"; } else { @@ -104,35 +104,38 @@ net::ProxyBypassRules ConvertOncExcludeDomainsToBypassRules( scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig( const base::DictionaryValue& onc_proxy_settings) { std::string type; - onc_proxy_settings.GetStringWithoutPathExpansion(proxy::kType, &type); + onc_proxy_settings.GetStringWithoutPathExpansion(::onc::proxy::kType, &type); scoped_ptr<DictionaryValue> proxy_dict; - if (type == proxy::kDirect) { + if (type == ::onc::proxy::kDirect) { proxy_dict.reset(ProxyConfigDictionary::CreateDirect()); - } else if (type == proxy::kWPAD) { + } else if (type == ::onc::proxy::kWPAD) { proxy_dict.reset(ProxyConfigDictionary::CreateAutoDetect()); - } else if (type == proxy::kPAC) { + } else if (type == ::onc::proxy::kPAC) { std::string pac_url; - onc_proxy_settings.GetStringWithoutPathExpansion(proxy::kPAC, &pac_url); + onc_proxy_settings.GetStringWithoutPathExpansion(::onc::proxy::kPAC, + &pac_url); GURL url(pac_url); DCHECK(url.is_valid()) << "PAC field is invalid for this ProxySettings.Type"; proxy_dict.reset(ProxyConfigDictionary::CreatePacScript(url.spec(), false)); - } else if (type == proxy::kManual) { + } else if (type == ::onc::proxy::kManual) { const base::DictionaryValue* manual_dict = NULL; - onc_proxy_settings.GetDictionaryWithoutPathExpansion(proxy::kManual, + onc_proxy_settings.GetDictionaryWithoutPathExpansion(::onc::proxy::kManual, &manual_dict); std::string manual_spec; - AppendProxyServerForScheme(*manual_dict, proxy::kFtp, &manual_spec); - AppendProxyServerForScheme(*manual_dict, proxy::kHttp, &manual_spec); - AppendProxyServerForScheme(*manual_dict, proxy::kSocks, &manual_spec); - AppendProxyServerForScheme(*manual_dict, proxy::kHttps, &manual_spec); + AppendProxyServerForScheme(*manual_dict, ::onc::proxy::kFtp, &manual_spec); + AppendProxyServerForScheme(*manual_dict, ::onc::proxy::kHttp, &manual_spec); + AppendProxyServerForScheme(*manual_dict, ::onc::proxy::kSocks, + &manual_spec); + AppendProxyServerForScheme(*manual_dict, ::onc::proxy::kHttps, + &manual_spec); const base::ListValue* exclude_domains = NULL; net::ProxyBypassRules bypass_rules; - if (onc_proxy_settings.GetListWithoutPathExpansion(proxy::kExcludeDomains, - &exclude_domains)) { + if (onc_proxy_settings.GetListWithoutPathExpansion( + ::onc::proxy::kExcludeDomains, &exclude_domains)) { bypass_rules.AssignFrom( ConvertOncExcludeDomainsToBypassRules(*exclude_domains)); } @@ -155,9 +158,9 @@ class UserStringSubstitution : public chromeos::onc::StringSubstitution { virtual bool GetSubstitute(const std::string& placeholder, std::string* substitute) const OVERRIDE { - if (placeholder == chromeos::onc::substitutes::kLoginIDField) + if (placeholder == ::onc::substitutes::kLoginIDField) *substitute = user_->GetAccountName(false); - else if (placeholder == chromeos::onc::substitutes::kEmailField) + else if (placeholder == ::onc::substitutes::kEmailField) *substitute = user_->email(); else return false; @@ -218,7 +221,7 @@ void ImportNetworksForUser(const chromeos::User* user, *normalized_network); scoped_ptr<NetworkUIData> ui_data = NetworkUIData::CreateFromONC( - onc::ONC_SOURCE_USER_IMPORT, *normalized_network); + ::onc::ONC_SOURCE_USER_IMPORT, *normalized_network); base::DictionaryValue ui_data_dict; ui_data->FillDictionary(&ui_data_dict); std::string ui_data_json; @@ -238,7 +241,7 @@ void ImportNetworksForUser(const chromeos::User* user, const base::DictionaryValue* FindPolicyForActiveUser( const std::string& guid, - onc::ONCSource* onc_source) { + ::onc::ONCSource* onc_source) { const User* user = UserManager::Get()->GetActiveUser(); std::string username_hash = user ? user->username_hash() : std::string(); return NetworkHandler::Get()->managed_network_configuration_handler()-> @@ -257,7 +260,7 @@ const base::DictionaryValue* GetNetworkConfigByGUID( DCHECK(network); std::string current_guid; - network->GetStringWithoutPathExpansion(onc::network_config::kGUID, + network->GetStringWithoutPathExpansion(::onc::network_config::kGUID, ¤t_guid); if (current_guid == guid) return network; @@ -275,18 +278,18 @@ const base::DictionaryValue* GetNetworkConfigForEthernetWithoutEAP( DCHECK(network); std::string type; - network->GetStringWithoutPathExpansion(onc::network_config::kType, &type); - if (type != onc::network_type::kEthernet) + network->GetStringWithoutPathExpansion(::onc::network_config::kType, &type); + if (type != ::onc::network_type::kEthernet) continue; const base::DictionaryValue* ethernet = NULL; - network->GetDictionaryWithoutPathExpansion(onc::network_config::kEthernet, + network->GetDictionaryWithoutPathExpansion(::onc::network_config::kEthernet, ðernet); std::string auth; - ethernet->GetStringWithoutPathExpansion(onc::ethernet::kAuthentication, + ethernet->GetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, &auth); - if (auth == onc::ethernet::kNone) + if (auth == ::onc::ethernet::kNone) return network; } return NULL; @@ -368,22 +371,22 @@ const base::DictionaryValue* GetPolicyForFavoriteNetwork( const PrefService* profile_prefs, const PrefService* local_state_prefs, const FavoriteState& favorite, - onc::ONCSource* onc_source) { + ::onc::ONCSource* onc_source) { VLOG(2) << "GetPolicyForFavoriteNetwork: " << favorite.path(); - *onc_source = onc::ONC_SOURCE_NONE; + *onc_source = ::onc::ONC_SOURCE_NONE; const base::DictionaryValue* network_policy = GetPolicyForNetworkFromPref( profile_prefs, prefs::kOpenNetworkConfiguration, favorite); if (network_policy) { VLOG(1) << "Network " << favorite.path() << " is managed by user policy."; - *onc_source = onc::ONC_SOURCE_USER_POLICY; + *onc_source = ::onc::ONC_SOURCE_USER_POLICY; return network_policy; } network_policy = GetPolicyForNetworkFromPref( local_state_prefs, prefs::kDeviceOpenNetworkConfiguration, favorite); if (network_policy) { VLOG(1) << "Network " << favorite.path() << " is managed by device policy."; - *onc_source = onc::ONC_SOURCE_DEVICE_POLICY; + *onc_source = ::onc::ONC_SOURCE_DEVICE_POLICY; return network_policy; } VLOG(2) << "Network " << favorite.path() << " is unmanaged."; @@ -393,7 +396,7 @@ const base::DictionaryValue* GetPolicyForFavoriteNetwork( bool HasPolicyForFavoriteNetwork(const PrefService* profile_prefs, const PrefService* local_state_prefs, const FavoriteState& network) { - onc::ONCSource ignored_onc_source; + ::onc::ONCSource ignored_onc_source; const base::DictionaryValue* policy = onc::GetPolicyForFavoriteNetwork( profile_prefs, local_state_prefs, network, &ignored_onc_source); return policy != NULL; diff --git a/chrome/browser/chromeos/net/onc_utils.h b/chrome/browser/chromeos/net/onc_utils.h index 4aa2f4e..35d0762 100644 --- a/chrome/browser/chromeos/net/onc_utils.h +++ b/chrome/browser/chromeos/net/onc_utils.h @@ -8,7 +8,7 @@ #include <string> #include "base/memory/scoped_ptr.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" class PrefService; @@ -50,7 +50,7 @@ void ImportNetworksForUser(const chromeos::User* user, // |onc_source| accordingly. const base::DictionaryValue* FindPolicyForActiveUser( const std::string& guid, - onc::ONCSource* onc_source); + ::onc::ONCSource* onc_source); // Returns the effective (user or device) policy for network |favorite|. Both // |profile_prefs| and |local_state_prefs| might be NULL. Returns NULL if no @@ -59,7 +59,7 @@ const base::DictionaryValue* GetPolicyForFavoriteNetwork( const PrefService* profile_prefs, const PrefService* local_state_prefs, const FavoriteState& favorite, - onc::ONCSource* onc_source); + ::onc::ONCSource* onc_source); // Convenience function to check only whether a policy for a network exists. bool HasPolicyForFavoriteNetwork(const PrefService* profile_prefs, diff --git a/chrome/browser/chromeos/net/proxy_config_handler.cc b/chrome/browser/chromeos/net/proxy_config_handler.cc index beda0e5..de0b58a 100644 --- a/chrome/browser/chromeos/net/proxy_config_handler.cc +++ b/chrome/browser/chromeos/net/proxy_config_handler.cc @@ -42,7 +42,7 @@ scoped_ptr<ProxyConfigDictionary> GetProxyConfigForFavoriteNetwork( const PrefService* profile_prefs, const PrefService* local_state_prefs, const FavoriteState& network, - onc::ONCSource* onc_source) { + ::onc::ONCSource* onc_source) { const base::DictionaryValue* network_policy = onc::GetPolicyForFavoriteNetwork( profile_prefs, local_state_prefs, network, onc_source); @@ -50,7 +50,7 @@ scoped_ptr<ProxyConfigDictionary> GetProxyConfigForFavoriteNetwork( if (network_policy) { const base::DictionaryValue* proxy_policy = NULL; network_policy->GetDictionaryWithoutPathExpansion( - onc::network_config::kProxySettings, &proxy_policy); + ::onc::network_config::kProxySettings, &proxy_policy); if (!proxy_policy) { // This policy doesn't set a proxy for this network. Nonetheless, this // disallows changes by the user. diff --git a/chrome/browser/chromeos/net/proxy_config_handler.h b/chrome/browser/chromeos/net/proxy_config_handler.h index 4afe63f..5aae4d6 100644 --- a/chrome/browser/chromeos/net/proxy_config_handler.h +++ b/chrome/browser/chromeos/net/proxy_config_handler.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_CHROMEOS_NET_PROXY_CONFIG_HANDLER_H_ #include "base/memory/scoped_ptr.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" class PrefRegistrySimple; class PrefService; 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" diff --git a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc index 671903f..7179622 100644 --- a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc +++ b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc @@ -21,15 +21,13 @@ #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" #include "chrome/common/pref_names.h" #include "chromeos/dbus/power_policy_controller.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_signature.h" #include "chromeos/network/onc/onc_utils.h" #include "chromeos/network/onc/onc_validator.h" +#include "components/onc/onc_constants.h" #include "grit/generated_resources.h" #include "policy/policy_constants.h" -namespace onc = chromeos::onc; - namespace policy { // static @@ -63,7 +61,7 @@ bool NetworkConfigurationPolicyHandler::CheckPolicySettings( std::string onc_blob; value->GetAsString(&onc_blob); scoped_ptr<base::DictionaryValue> root_dict = - onc::ReadDictionaryFromJson(onc_blob); + chromeos::onc::ReadDictionaryFromJson(onc_blob); if (root_dict.get() == NULL) { errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_PARSE_FAILED); return false; @@ -71,19 +69,21 @@ bool NetworkConfigurationPolicyHandler::CheckPolicySettings( // Validate the ONC dictionary. We are liberal and ignore unknown field // names and ignore invalid field names in kRecommended arrays. - onc::Validator validator(false, // Ignore unknown fields. - false, // Ignore invalid recommended field names. - true, // Fail on missing fields. - true); // Validate for managed ONC + chromeos::onc::Validator validator( + false, // Ignore unknown fields. + false, // Ignore invalid recommended field names. + true, // Fail on missing fields. + true); // Validate for managed ONC validator.SetOncSource(onc_source_); // ONC policies are always unencrypted. - onc::Validator::Result validation_result; + chromeos::onc::Validator::Result validation_result; root_dict = validator.ValidateAndRepairObject( - &onc::kToplevelConfigurationSignature, *root_dict, &validation_result); - if (validation_result == onc::Validator::VALID_WITH_WARNINGS) + &chromeos::onc::kToplevelConfigurationSignature, *root_dict, + &validation_result); + if (validation_result == chromeos::onc::Validator::VALID_WITH_WARNINGS) errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_PARTIAL); - else if (validation_result == onc::Validator::INVALID) + else if (validation_result == chromeos::onc::Validator::INVALID) errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_FAILED); // In any case, don't reject the policy as some networks or certificates @@ -126,7 +126,7 @@ void NetworkConfigurationPolicyHandler::PrepareForDisplaying( NetworkConfigurationPolicyHandler::NetworkConfigurationPolicyHandler( const char* policy_name, - chromeos::onc::ONCSource onc_source, + onc::ONCSource onc_source, const char* pref_path) : TypeCheckingPolicyHandler(policy_name, base::Value::TYPE_STRING), onc_source_(onc_source), @@ -141,15 +141,15 @@ base::Value* NetworkConfigurationPolicyHandler::SanitizeNetworkConfig( return NULL; scoped_ptr<base::DictionaryValue> toplevel_dict = - onc::ReadDictionaryFromJson(json_string); + chromeos::onc::ReadDictionaryFromJson(json_string); if (!toplevel_dict) return NULL; // Placeholder to insert in place of the filtered setting. const char kPlaceholder[] = "********"; - toplevel_dict = onc::MaskCredentialsInOncObject( - onc::kToplevelConfigurationSignature, + toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( + chromeos::onc::kToplevelConfigurationSignature, *toplevel_dict, kPlaceholder); diff --git a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h index 50de98d..f470b51 100644 --- a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h +++ b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h @@ -7,7 +7,7 @@ #include "chrome/browser/policy/configuration_policy_handler.h" #include "chromeos/network/network_ui_data.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" namespace base { class DictionaryValue; @@ -36,7 +36,7 @@ class NetworkConfigurationPolicyHandler : public TypeCheckingPolicyHandler { private: explicit NetworkConfigurationPolicyHandler( const char* policy_name, - chromeos::onc::ONCSource onc_source, + ::onc::ONCSource onc_source, const char* pref_path); // Takes network policy in Value representation and produces an output Value @@ -47,7 +47,7 @@ class NetworkConfigurationPolicyHandler : public TypeCheckingPolicyHandler { // The kind of ONC source that this handler represents. ONCSource // distinguishes between user and device policy. - const chromeos::onc::ONCSource onc_source_; + const ::onc::ONCSource onc_source_; // The name of the pref to apply the policy to. const char* pref_path_; diff --git a/chrome/browser/chromeos/policy/network_configuration_updater.cc b/chrome/browser/chromeos/policy/network_configuration_updater.cc index d9c2d14..d4f29c2 100644 --- a/chrome/browser/chromeos/policy/network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/network_configuration_updater.cc @@ -27,7 +27,7 @@ NetworkConfigurationUpdater::CreateForDevicePolicy( PolicyService* policy_service, chromeos::ManagedNetworkConfigurationHandler* network_config_handler) { scoped_ptr<NetworkConfigurationUpdater> updater( - new NetworkConfigurationUpdater(chromeos::onc::ONC_SOURCE_DEVICE_POLICY, + new NetworkConfigurationUpdater(onc::ONC_SOURCE_DEVICE_POLICY, key::kDeviceOpenNetworkConfiguration, certificate_importer.Pass(), policy_service, @@ -55,7 +55,7 @@ void NetworkConfigurationUpdater::OnPolicyServiceInitialized( } NetworkConfigurationUpdater::NetworkConfigurationUpdater( - chromeos::onc::ONCSource onc_source, + onc::ONCSource onc_source, std::string policy_key, scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer, PolicyService* policy_service, diff --git a/chrome/browser/chromeos/policy/network_configuration_updater.h b/chrome/browser/chromeos/policy/network_configuration_updater.h index c10a224..3e7fe0d 100644 --- a/chrome/browser/chromeos/policy/network_configuration_updater.h +++ b/chrome/browser/chromeos/policy/network_configuration_updater.h @@ -11,7 +11,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/policy/policy_service.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" namespace base { class Value; @@ -55,7 +55,7 @@ class NetworkConfigurationUpdater : public PolicyService::Observer { protected: NetworkConfigurationUpdater( - chromeos::onc::ONCSource onc_source, + onc::ONCSource onc_source, std::string policy_key, scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer, PolicyService* policy_service, @@ -71,7 +71,7 @@ class NetworkConfigurationUpdater : public PolicyService::Observer { // modify |network_configs_onc| before the actual application. virtual void ApplyNetworkPolicy(base::ListValue* network_configs_onc); - chromeos::onc::ONCSource onc_source_; + onc::ONCSource onc_source_; // Pointer to the global singleton or a test instance. chromeos::ManagedNetworkConfigurationHandler* network_config_handler_; diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc index 53cc0b5..6b48c5c 100644 --- a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc +++ b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc @@ -17,9 +17,9 @@ #include "chrome/browser/policy/policy_service_impl.h" #include "chromeos/network/mock_managed_network_configuration_handler.h" #include "chromeos/network/onc/mock_certificate_importer.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_test_utils.h" #include "chromeos/network/onc/onc_utils.h" +#include "components/onc/onc_constants.h" #include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_utils.h" #include "net/base/test_data_directory.h" @@ -37,8 +37,6 @@ using testing::Return; using testing::StrictMock; using testing::_; -namespace onc = ::chromeos::onc; - namespace policy { namespace { @@ -120,7 +118,7 @@ class NetworkConfigurationUpdaterTest : public testing::Test { empty_certificates_.reset(new base::ListValue); scoped_ptr<base::DictionaryValue> fake_toplevel_onc = - onc::ReadDictionaryFromJson(kFakeONC); + chromeos::onc::ReadDictionaryFromJson(kFakeONC); scoped_ptr<base::Value> network_configs_value; base::ListValue* network_configs = NULL; @@ -136,7 +134,8 @@ class NetworkConfigurationUpdaterTest : public testing::Test { certs_value.release()->GetAsList(&certs); fake_certificates_.reset(certs); - certificate_importer_ = new StrictMock<onc::MockCertificateImporter>(); + certificate_importer_ = + new StrictMock<chromeos::onc::MockCertificateImporter>(); certificate_importer_owned_.reset(certificate_importer_); } @@ -184,8 +183,8 @@ class NetworkConfigurationUpdaterTest : public testing::Test { // NetworkConfigurationUpdater. When that happens, |certificate_importer_| // continues to point to that instance but |certificate_importer_owned_| is // released. - StrictMock<onc::MockCertificateImporter>* certificate_importer_; - scoped_ptr<onc::CertificateImporter> certificate_importer_owned_; + StrictMock<chromeos::onc::MockCertificateImporter>* certificate_importer_; + scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer_owned_; StrictMock<MockConfigurationPolicyProvider> provider_; scoped_ptr<PolicyServiceImpl> policy_service_; @@ -197,10 +196,10 @@ class NetworkConfigurationUpdaterTest : public testing::Test { TEST_F(NetworkConfigurationUpdaterTest, PolicyIsValidatedAndRepaired) { std::string onc_policy = - onc::test_utils::ReadTestData("toplevel_partially_invalid.onc"); + chromeos::onc::test_utils::ReadTestData("toplevel_partially_invalid.onc"); scoped_ptr<base::DictionaryValue> onc_repaired = - onc::test_utils::ReadTestDictionary( + chromeos::onc::test_utils::ReadTestDictionary( "repaired_toplevel_partially_invalid.onc"); base::ListValue* network_configs_repaired = NULL; diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc index 1d7859b..990f5bd 100644 --- a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc @@ -44,7 +44,7 @@ UserNetworkConfigurationUpdater::UserNetworkConfigurationUpdater( scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer, PolicyService* policy_service, chromeos::ManagedNetworkConfigurationHandler* network_config_handler) - : NetworkConfigurationUpdater(chromeos::onc::ONC_SOURCE_USER_POLICY, + : NetworkConfigurationUpdater(onc::ONC_SOURCE_USER_POLICY, key::kOpenNetworkConfiguration, certificate_importer.Pass(), policy_service, diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc index 6f1ef8b..335a309 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.cc +++ b/chrome/browser/chromeos/proxy_config_service_impl.cc @@ -37,7 +37,7 @@ bool GetProxyConfig(const PrefService* profile_prefs, const PrefService* local_state_prefs, const FavoriteState& network, net::ProxyConfig* proxy_config, - onc::ONCSource* onc_source) { + ::onc::ONCSource* onc_source) { scoped_ptr<ProxyConfigDictionary> proxy_dict = proxy_config::GetProxyConfigForFavoriteNetwork( profile_prefs, local_state_prefs, network, onc_source); @@ -118,7 +118,7 @@ void ProxyConfigServiceImpl::DefaultNetworkChanged( // static bool ProxyConfigServiceImpl::IgnoreProxy(const PrefService* profile_prefs, const std::string network_profile_path, - onc::ONCSource onc_source) { + ::onc::ONCSource onc_source) { if (!profile_prefs) { // If the profile preference are not available, this must be the object // associated to local state used for system requests or login-profile. Make @@ -141,7 +141,7 @@ bool ProxyConfigServiceImpl::IgnoreProxy(const PrefService* profile_prefs, VLOG(1) << "Respect proxy of not-shared networks."; return false; } - if (onc_source == onc::ONC_SOURCE_DEVICE_POLICY) { + if (onc_source == ::onc::ONC_SOURCE_DEVICE_POLICY) { policy::BrowserPolicyConnector* connector = g_browser_process->browser_policy_connector(); const User* logged_in_user = UserManager::Get()->GetLoggedInUser(); @@ -173,7 +173,7 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() { net::ProxyConfigService::CONFIG_UNSET; bool ignore_proxy = true; if (network) { - onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; + ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; const bool network_proxy_configured = chromeos::GetProxyConfig( prefs(), local_state_prefs_, *network, &network_config, &onc_source); ignore_proxy = diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h index 1037a05..81ec9e2 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.h +++ b/chrome/browser/chromeos/proxy_config_service_impl.h @@ -12,7 +12,7 @@ #include "base/prefs/pref_change_registrar.h" #include "chrome/browser/net/pref_proxy_config_tracker_impl.h" #include "chromeos/network/network_state_handler_observer.h" -#include "chromeos/network/onc/onc_constants.h" +#include "components/onc/onc_constants.h" namespace chromeos { diff --git a/chrome/browser/extensions/api/networking_private/DEPS b/chrome/browser/extensions/api/networking_private/DEPS new file mode 100644 index 0000000..273d26b --- /dev/null +++ b/chrome/browser/extensions/api/networking_private/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+components/onc", +] diff --git a/chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc b/chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc index baff579..96aa57a 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_api_chromeos.cc @@ -20,12 +20,12 @@ #include "chromeos/network/network_connection_handler.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_signature.h" #include "chromeos/network/onc/onc_translator.h" +#include "components/onc/onc_constants.h" namespace api = extensions::api::networking_private; -namespace onc = chromeos::onc; + using chromeos::DBusThreadManager; using chromeos::ManagedNetworkConfigurationHandler; using chromeos::NetworkHandler; @@ -171,8 +171,8 @@ bool NetworkingPrivateGetStateFunction::RunImpl() { scoped_ptr<base::DictionaryValue> result_dict(new base::DictionaryValue); state->GetProperties(result_dict.get()); scoped_ptr<base::DictionaryValue> onc_network_part = - onc::TranslateShillServiceToONCPart(*result_dict, - &onc::kNetworkWithStateSignature); + chromeos::onc::TranslateShillServiceToONCPart(*result_dict, + &chromeos::onc::kNetworkWithStateSignature); SetResult(onc_network_part.release()); SendResponse(true); @@ -285,8 +285,8 @@ bool NetworkingPrivateGetVisibleNetworksFunction::RunImpl() { (*it)->GetProperties(&shill_dictionary); scoped_ptr<base::DictionaryValue> onc_network_part = - onc::TranslateShillServiceToONCPart(shill_dictionary, - &onc::kNetworkWithStateSignature); + chromeos::onc::TranslateShillServiceToONCPart(shill_dictionary, + &chromeos::onc::kNetworkWithStateSignature); std::string onc_type; onc_network_part->GetStringWithoutPathExpansion(onc::network_config::kType, diff --git a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc index 364fd84..42acc0e 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc @@ -25,8 +25,8 @@ #include "chromeos/dbus/shill_profile_client.h" #include "chromeos/dbus/shill_service_client.h" #include "chromeos/dbus/shill_stub_helper.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_utils.h" +#include "components/onc/onc_constants.h" #include "policy/policy_constants.h" #include "third_party/cros_system_api/dbus/service_constants.h" #endif // OS_CHROMEOS diff --git a/chrome/browser/extensions/api/networking_private/networking_private_event_router_chromeos.cc b/chrome/browser/extensions/api/networking_private/networking_private_event_router_chromeos.cc index c431c7f..9699833 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_event_router_chromeos.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_event_router_chromeos.cc @@ -15,10 +15,10 @@ #include "chromeos/network/network_event_log.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_signature.h" #include "chromeos/network/onc/onc_translator.h" #include "components/browser_context_keyed_service/browser_context_dependency_manager.h" +#include "components/onc/onc_constants.h" #include "third_party/cros_system_api/dbus/service_constants.h" using extensions::EventRouter; diff --git a/chrome/browser/ui/webui/net_internals/DEPS b/chrome/browser/ui/webui/net_internals/DEPS new file mode 100644 index 0000000..273d26b --- /dev/null +++ b/chrome/browser/ui/webui/net_internals/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+components/onc", +] diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index 00a9553..3f55e34 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc @@ -51,6 +51,7 @@ #include "chrome/common/net/url_fixer_upper.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "components/onc/onc_constants.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/resource_dispatcher_host.h" @@ -85,7 +86,6 @@ #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/debug_daemon_client.h" #include "chromeos/network/onc/onc_certificate_importer_impl.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/onc/onc_utils.h" #endif #if defined(OS_WIN) @@ -1549,7 +1549,7 @@ void NetInternalsMessageHandler::OnImportONCFile(const ListValue* list) { std::string error; const chromeos::User* user = chromeos::UserManager::Get()->GetActiveUser(); if (user) { - chromeos::onc::ONCSource onc_source = chromeos::onc::ONC_SOURCE_USER_IMPORT; + onc::ONCSource onc_source = onc::ONC_SOURCE_USER_IMPORT; base::ListValue network_configs; base::ListValue certificates; diff --git a/chrome/browser/ui/webui/options/chromeos/DEPS b/chrome/browser/ui/webui/options/chromeos/DEPS new file mode 100644 index 0000000..273d26b --- /dev/null +++ b/chrome/browser/ui/webui/options/chromeos/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+components/onc", +] diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc index c961564..cd32787 100644 --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc @@ -62,8 +62,8 @@ #include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_ui_data.h" #include "chromeos/network/network_util.h" -#include "chromeos/network/onc/onc_constants.h" #include "chromeos/network/shill_property_util.h" +#include "components/onc/onc_constants.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_view.h" @@ -635,7 +635,7 @@ void PopulateVPNDetails(const NetworkState* vpn, } dictionary->SetString(kTagUsername, username); - onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; + ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; const base::DictionaryValue* onc = onc::FindPolicyForActiveUser(vpn->guid(), &onc_source); @@ -643,7 +643,8 @@ void PopulateVPNDetails(const NetworkState* vpn, hostname_ui_data.ParseOncProperty( onc_source, onc, - base::StringPrintf("%s.%s", onc::network_config::kVPN, onc::vpn::kHost)); + base::StringPrintf("%s.%s", ::onc::network_config::kVPN, + ::onc::vpn::kHost)); std::string provider_host; provider_properties->GetStringWithoutPathExpansion( shill::kHostProperty, &provider_host); @@ -1489,7 +1490,7 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback( details_path_ = service_path; - 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); const NetworkPropertyUIData property_ui_data(onc_source); @@ -1572,13 +1573,13 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback( if (type == shill::kTypeWifi) { onc_path_to_auto_connect = base::StringPrintf( "%s.%s", - onc::network_config::kWiFi, - onc::wifi::kAutoConnect); + ::onc::network_config::kWiFi, + ::onc::wifi::kAutoConnect); } else if (type == shill::kTypeVPN) { onc_path_to_auto_connect = base::StringPrintf( "%s.%s", - onc::network_config::kVPN, - onc::vpn::kAutoConnect); + ::onc::network_config::kVPN, + ::onc::vpn::kAutoConnect); } if (!onc_path_to_auto_connect.empty()) { auto_connect_ui_data.ParseOncProperty( diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc index bd5c096..f0afd95 100644 --- a/chrome/browser/ui/webui/options/preferences_browsertest.cc +++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc @@ -833,10 +833,10 @@ class ProxyPreferencesBrowserTest : public PreferencesBrowserTest { } void VerifyCurrentProxyServer(const std::string& expected_server, - chromeos::onc::ONCSource expected_source) { + onc::ONCSource expected_source) { const chromeos::FavoriteState* network = GetDefaultFavoriteNetwork(); ASSERT_TRUE(network); - chromeos::onc::ONCSource actual_source; + onc::ONCSource actual_source; scoped_ptr<ProxyConfigDictionary> proxy_dict = chromeos::proxy_config::GetProxyConfigForFavoriteNetwork( pref_service_, @@ -969,7 +969,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSSetProxy) { SetProxyPref(chromeos::kProxySingleHttp, base::StringValue("www.adomain.xy")); VerifyCurrentProxyServer("www.adomain.xy:123", - chromeos::onc::ONC_SOURCE_NONE); + onc::ONC_SOURCE_NONE); } // Verify that default proxy ports are used and that ports can be updated @@ -989,7 +989,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSProxyDefaultPorts) { // Verify default ports. VerifyCurrentProxyServer( "http=a.com:80;https=4.3.2.1:80;ftp=c.com:80;socks=socks4://d.com:1080", - chromeos::onc::ONC_SOURCE_NONE); + onc::ONC_SOURCE_NONE); // Set and verify the ports. SetProxyPref(chromeos::kProxyHttpPort, base::FundamentalValue(1)); @@ -999,7 +999,7 @@ IN_PROC_BROWSER_TEST_F(ProxyPreferencesBrowserTest, ChromeOSProxyDefaultPorts) { VerifyCurrentProxyServer( "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", - chromeos::onc::ONC_SOURCE_NONE); + onc::ONC_SOURCE_NONE); } #endif diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi index 85fa450..5037378 100644 --- a/chrome/chrome_browser_chromeos.gypi +++ b/chrome/chrome_browser_chromeos.gypi @@ -50,6 +50,7 @@ # browser_chromeos #includes power_supply_properties.pb.h directly. '../chromeos/chromeos.gyp:power_manager_proto', '../chromeos/ime/input_method.gyp:gencode', + '../components/components.gyp:onc_component', # This depends directly on the variations target, rather than just # transitively via the common target because the proto sources need to # be generated before code in this target can start building. diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 051faff..d36fc75 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi @@ -26,6 +26,7 @@ 'debugger', 'in_memory_url_index_cache_proto', 'installer_util', + '../components/components.gyp:onc_component', '../content/content.gyp:content_browser', '../crypto/crypto.gyp:crypto', '../device/bluetooth/bluetooth.gyp:device_bluetooth', diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 27f0325..65673a5 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -30,6 +30,7 @@ 'safe_browsing_report_proto', 'feedback_proto', '../components/components.gyp:auto_login_parser', + '../components/components.gyp:onc_component', '../content/content.gyp:content_browser', '../content/content.gyp:content_common', '../crypto/crypto.gyp:crypto', |