| 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 "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 LOG(WARNING) << "Integer value " << value | 37 LOG(WARNING) << "Integer value " << value |
| 38 << " out of numeric limits, ignoring."; | 38 << " out of numeric limits, ignoring."; |
| 39 return NULL; | 39 return NULL; |
| 40 } | 40 } |
| 41 | 41 |
| 42 return Value::CreateIntegerValue(static_cast<int>(value)); | 42 return Value::CreateIntegerValue(static_cast<int>(value)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 Value* DecodeConnectionType(int value) { | 45 Value* DecodeConnectionType(int value) { |
| 46 static const char* const kConnectionTypes[] = { | 46 static const char* const kConnectionTypes[] = { |
| 47 shill::kTypeEthernetEap, |
| 47 flimflam::kTypeEthernet, | 48 flimflam::kTypeEthernet, |
| 48 flimflam::kTypeWifi, | 49 flimflam::kTypeWifi, |
| 49 flimflam::kTypeWimax, | 50 flimflam::kTypeWimax, |
| 50 flimflam::kTypeBluetooth, | 51 flimflam::kTypeBluetooth, |
| 51 flimflam::kTypeCellular, | 52 flimflam::kTypeCellular, |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 if (value < 0 || value >= static_cast<int>(arraysize(kConnectionTypes))) | 55 if (value < 0 || value >= static_cast<int>(arraysize(kConnectionTypes))) |
| 55 return NULL; | 56 return NULL; |
| 56 | 57 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 DecodeLoginPolicies(policy, policies); | 675 DecodeLoginPolicies(policy, policies); |
| 675 DecodeKioskPolicies(policy, policies, install_attributes); | 676 DecodeKioskPolicies(policy, policies, install_attributes); |
| 676 DecodeNetworkPolicies(policy, policies, install_attributes); | 677 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 677 DecodeReportingPolicies(policy, policies); | 678 DecodeReportingPolicies(policy, policies); |
| 678 DecodeAutoUpdatePolicies(policy, policies); | 679 DecodeAutoUpdatePolicies(policy, policies); |
| 679 DecodeAccessibilityPolicies(policy, policies); | 680 DecodeAccessibilityPolicies(policy, policies); |
| 680 DecodeGenericPolicies(policy, policies); | 681 DecodeGenericPolicies(policy, policies); |
| 681 } | 682 } |
| 682 | 683 |
| 683 } // namespace policy | 684 } // namespace policy |
| OLD | NEW |