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

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 2836083002: [CrOS Tether] Update NetworkConfigurationHandler::GetShillProperties() to work with Tether networks. (Closed)
Patch Set: Ready for review. Created 3 years, 8 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
Index: chromeos/network/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index 8ada86f35ce871ea9c857f0f00718c159f95b5b4..1438ac4ebbe092aa4a483f465def3b62a8bff98f 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -143,13 +143,17 @@ void ManagedNetworkConfigurationHandlerImpl::SendManagedProperties(
&profile_path);
const NetworkProfile* profile =
network_profile_handler_->GetProfileForPath(profile_path);
- if (!profile)
+ if (!profile && !onc::IsTetherShillDictionary(*shill_properties)) {
stevenjb 2017/04/24 21:26:41 We should avoid putting IsTetherShillDictionary()
Kyle Horimoto 2017/04/25 01:18:32 Done.
+ // Tether networks are not expected to have an associated profile; only
+ // log an error if the provided properties do not correspond to a
+ // Tether network.
NET_LOG_ERROR("No profile for service: " + profile_path, service_path);
+ }
std::unique_ptr<NetworkUIData> ui_data =
shill_property_util::GetUIDataFromProperties(*shill_properties);
- const base::DictionaryValue* user_settings = NULL;
+ const base::DictionaryValue* user_settings = nullptr;
if (ui_data && profile) {
user_settings = ui_data->user_settings();
@@ -172,8 +176,8 @@ void ManagedNetworkConfigurationHandlerImpl::SendManagedProperties(
&onc::kNetworkWithStateSignature,
network_state));
- const base::DictionaryValue* network_policy = NULL;
- const base::DictionaryValue* global_policy = NULL;
+ const base::DictionaryValue* network_policy = nullptr;
+ const base::DictionaryValue* global_policy = nullptr;
if (profile) {
const Policies* policies = GetPoliciesForProfile(*profile);
if (!policies) {
« no previous file with comments | « no previous file | chromeos/network/network_configuration_handler.cc » ('j') | chromeos/network/network_configuration_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698