| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/onc/onc_utils.h" | 5 #include "chromeos/network/onc/onc_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chromeos/network/network_profile_handler.h" | 24 #include "chromeos/network/network_profile_handler.h" |
| 25 #include "chromeos/network/network_state.h" | 25 #include "chromeos/network/network_state.h" |
| 26 #include "chromeos/network/network_state_handler.h" | 26 #include "chromeos/network/network_state_handler.h" |
| 27 #include "chromeos/network/network_ui_data.h" | 27 #include "chromeos/network/network_ui_data.h" |
| 28 #include "chromeos/network/onc/onc_mapper.h" | 28 #include "chromeos/network/onc/onc_mapper.h" |
| 29 #include "chromeos/network/onc/onc_normalizer.h" | 29 #include "chromeos/network/onc/onc_normalizer.h" |
| 30 #include "chromeos/network/onc/onc_signature.h" | 30 #include "chromeos/network/onc/onc_signature.h" |
| 31 #include "chromeos/network/onc/onc_translator.h" | 31 #include "chromeos/network/onc/onc_translator.h" |
| 32 #include "chromeos/network/onc/onc_utils.h" | 32 #include "chromeos/network/onc/onc_utils.h" |
| 33 #include "chromeos/network/onc/onc_validator.h" | 33 #include "chromeos/network/onc/onc_validator.h" |
| 34 #include "chromeos/network/tether_constants.h" |
| 34 #include "components/device_event_log/device_event_log.h" | 35 #include "components/device_event_log/device_event_log.h" |
| 36 #include "components/onc/onc_constants.h" |
| 35 #include "components/onc/onc_pref_names.h" | 37 #include "components/onc/onc_pref_names.h" |
| 36 #include "components/prefs/pref_service.h" | 38 #include "components/prefs/pref_service.h" |
| 37 #include "components/proxy_config/proxy_config_dictionary.h" | 39 #include "components/proxy_config/proxy_config_dictionary.h" |
| 38 #include "components/signin/core/account_id/account_id.h" | 40 #include "components/signin/core/account_id/account_id.h" |
| 39 #include "components/url_formatter/url_fixer.h" | 41 #include "components/url_formatter/url_fixer.h" |
| 40 #include "components/user_manager/user.h" | 42 #include "components/user_manager/user.h" |
| 41 #include "components/user_manager/user_manager.h" | 43 #include "components/user_manager/user_manager.h" |
| 42 #include "crypto/encryptor.h" | 44 #include "crypto/encryptor.h" |
| 43 #include "crypto/hmac.h" | 45 #include "crypto/hmac.h" |
| 44 #include "crypto/symmetric_key.h" | 46 #include "crypto/symmetric_key.h" |
| (...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 | 1321 |
| 1320 bool HasPolicyForNetwork(const PrefService* profile_prefs, | 1322 bool HasPolicyForNetwork(const PrefService* profile_prefs, |
| 1321 const PrefService* local_state_prefs, | 1323 const PrefService* local_state_prefs, |
| 1322 const NetworkState& network) { | 1324 const NetworkState& network) { |
| 1323 ::onc::ONCSource ignored_onc_source; | 1325 ::onc::ONCSource ignored_onc_source; |
| 1324 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( | 1326 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( |
| 1325 profile_prefs, local_state_prefs, network, &ignored_onc_source); | 1327 profile_prefs, local_state_prefs, network, &ignored_onc_source); |
| 1326 return policy != NULL; | 1328 return policy != NULL; |
| 1327 } | 1329 } |
| 1328 | 1330 |
| 1331 bool IsTetherShillDictionary(const base::DictionaryValue& dict) { |
| 1332 std::string network_type; |
| 1333 return dict.GetStringWithoutPathExpansion(shill::kTypeProperty, |
| 1334 &network_type) && |
| 1335 network_type == kTypeTether; |
| 1336 } |
| 1337 |
| 1338 bool IsTetherOncDictionary(const base::DictionaryValue& dict) { |
| 1339 std::string network_type; |
| 1340 return dict.GetStringWithoutPathExpansion(network_config::kType, |
| 1341 &network_type) && |
| 1342 network_type == network_config::kTether; |
| 1343 } |
| 1344 |
| 1329 } // namespace onc | 1345 } // namespace onc |
| 1330 } // namespace chromeos | 1346 } // namespace chromeos |
| OLD | NEW |