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

Unified Diff: chrome/browser/chromeos/cros/network_library_impl_base.cc

Issue 11962048: This adds Cellular to the Shill to ONC translation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing broken unit test Created 7 years, 11 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 | « no previous file | chrome/browser/chromeos/cros/network_library_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/network_library_impl_base.cc
diff --git a/chrome/browser/chromeos/cros/network_library_impl_base.cc b/chrome/browser/chromeos/cros/network_library_impl_base.cc
index 0feb586d98f4ffd835b2f7e1ba4c83043ab367d4..27d092f5c83b7043b2d4d029631c8d515f288a69 100644
--- a/chrome/browser/chromeos/cros/network_library_impl_base.cc
+++ b/chrome/browser/chromeos/cros/network_library_impl_base.cc
@@ -1091,8 +1091,9 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
// Check and see if this is an encrypted ONC file. If so, decrypt it.
std::string onc_type;
- root_dict->GetStringWithoutPathExpansion(onc::kType, &onc_type);
- if (onc_type == onc::kEncryptedConfiguration) {
+ root_dict->GetStringWithoutPathExpansion(onc::network_config::kType,
+ &onc_type);
+ if (onc_type == onc::toplevel_config::kEncryptedConfiguration) {
root_dict = onc::Decrypt(passphrase, *root_dict);
if (root_dict.get() == NULL) {
LOG(ERROR) << "Couldn't decrypt the ONC from "
@@ -1134,11 +1135,13 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
const base::ListValue* certificates;
bool has_certificates =
- root_dict->GetListWithoutPathExpansion(onc::kCertificates, &certificates);
+ root_dict->GetListWithoutPathExpansion(
+ onc::toplevel_config::kCertificates,
+ &certificates);
const base::ListValue* network_configs;
bool has_network_configurations = root_dict->GetListWithoutPathExpansion(
- onc::kNetworkConfigurations,
+ onc::toplevel_config::kNetworkConfigurations,
&network_configs);
if (has_certificates) {
@@ -1168,10 +1171,10 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
&marked_for_removal);
std::string type;
- network->GetStringWithoutPathExpansion(onc::kType, &type);
+ network->GetStringWithoutPathExpansion(onc::network_config::kType, &type);
std::string guid;
- network->GetStringWithoutPathExpansion(onc::kGUID, &guid);
+ network->GetStringWithoutPathExpansion(onc::network_config::kGUID, &guid);
if (source == onc::ONC_SOURCE_USER_IMPORT && marked_for_removal) {
// User import supports the removal of networks by ID.
@@ -1212,7 +1215,7 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
// Set the ProxyConfig.
const base::DictionaryValue* proxy_settings;
if (normalized_network->GetDictionaryWithoutPathExpansion(
- onc::kProxySettings,
+ onc::network_config::kProxySettings,
&proxy_settings)) {
scoped_ptr<base::DictionaryValue> proxy_config =
onc::ConvertOncProxySettingsToProxyConfig(*proxy_settings);
@@ -1240,7 +1243,7 @@ bool NetworkLibraryImplBase::LoadOncNetworks(const std::string& onc_blob,
}
// For Ethernet networks, apply them to the current Ethernet service.
- if (type == onc::kEthernet) {
+ if (type == onc::network_type::kEthernet) {
const EthernetNetwork* ethernet = ethernet_network();
if (ethernet) {
CallConfigureService(ethernet->unique_id(), shill_dict.get());
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/network_library_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698