OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/network/policy_util.h" | 5 #include "chromeos/network/policy_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chromeos/network/network_profile.h" | 8 #include "chromeos/network/network_profile.h" |
9 #include "chromeos/network/network_ui_data.h" | 9 #include "chromeos/network/network_ui_data.h" |
10 #include "chromeos/network/onc/onc_constants.h" | 10 #include "chromeos/network/onc/onc_constants.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 // Remove irrelevant fields. | 148 // Remove irrelevant fields. |
149 onc::Normalizer normalizer(true /* remove recommended fields */); | 149 onc::Normalizer normalizer(true /* remove recommended fields */); |
150 effective = normalizer.NormalizeObject(&onc::kNetworkConfigurationSignature, | 150 effective = normalizer.NormalizeObject(&onc::kNetworkConfigurationSignature, |
151 *effective); | 151 *effective); |
152 | 152 |
153 scoped_ptr<base::DictionaryValue> shill_dictionary( | 153 scoped_ptr<base::DictionaryValue> shill_dictionary( |
154 onc::TranslateONCObjectToShill(&onc::kNetworkConfigurationSignature, | 154 onc::TranslateONCObjectToShill(&onc::kNetworkConfigurationSignature, |
155 *effective)); | 155 *effective)); |
156 | 156 |
157 shill_dictionary->SetStringWithoutPathExpansion(flimflam::kProfileProperty, | 157 shill_dictionary->SetStringWithoutPathExpansion(shill::kProfileProperty, |
158 profile.path); | 158 profile.path); |
159 | 159 |
160 scoped_ptr<NetworkUIData> ui_data; | 160 scoped_ptr<NetworkUIData> ui_data; |
161 if (policy) | 161 if (policy) |
162 ui_data = NetworkUIData::CreateFromONC(onc_source, *policy); | 162 ui_data = NetworkUIData::CreateFromONC(onc_source, *policy); |
163 else | 163 else |
164 ui_data.reset(new NetworkUIData()); | 164 ui_data.reset(new NetworkUIData()); |
165 | 165 |
166 if (settings) { | 166 if (settings) { |
167 // Shill doesn't know that sensitive data is contained in the UIData | 167 // Shill doesn't know that sensitive data is contained in the UIData |
(...skipping 24 matching lines...) Expand all Loading... |
192 it != policies.end(); ++it) { | 192 it != policies.end(); ++it) { |
193 if (IsPolicyMatching(*it->second, actual_network)) | 193 if (IsPolicyMatching(*it->second, actual_network)) |
194 return it->second; | 194 return it->second; |
195 } | 195 } |
196 return NULL; | 196 return NULL; |
197 } | 197 } |
198 | 198 |
199 } // namespace policy_util | 199 } // namespace policy_util |
200 | 200 |
201 } // namespace chromeos | 201 } // namespace chromeos |
OLD | NEW |