| 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_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/port.h" | 10 #include "base/port.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Product_S/N is still special-cased due to inconsistencies with serial | 48 // Product_S/N is still special-cased due to inconsistencies with serial |
| 49 // numbers on Lumpy devices: On these devices, serial_number is identical to | 49 // numbers on Lumpy devices: On these devices, serial_number is identical to |
| 50 // Product_S/N with an appended checksum. Unfortunately, the sticker on the | 50 // Product_S/N with an appended checksum. Unfortunately, the sticker on the |
| 51 // packaging doesn't include that checksum either (the sticker on the device | 51 // packaging doesn't include that checksum either (the sticker on the device |
| 52 // does though!). The former sticker is the source of the serial number used by | 52 // does though!). The former sticker is the source of the serial number used by |
| 53 // device management service, so we prefer Product_S/N over serial number to | 53 // device management service, so we prefer Product_S/N over serial number to |
| 54 // match the server. | 54 // match the server. |
| 55 // | 55 // |
| 56 // TODO(mnissler): Move serial_number back to the top once the server side uses | 56 // TODO(mnissler): Move serial_number back to the top once the server side uses |
| 57 // the correct serial number. | 57 // the correct serial number. |
| 58 const char* kMachineInfoSerialNumberKeys[] = { | 58 const char* const kMachineInfoSerialNumberKeys[] = { |
| 59 "Product_S/N", // Lumpy/Alex devices | 59 "Product_S/N", // Lumpy/Alex devices |
| 60 "serial_number", // VPD v2+ devices | 60 "serial_number", // VPD v2+ devices |
| 61 "Product_SN", // Mario | 61 "Product_SN", // Mario |
| 62 "sn", // old ZGB devices (more recent ones use serial_number) | 62 "sn", // old ZGB devices (more recent ones use serial_number) |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 // Fetches a machine statistic value from StatisticsProvider, returns an empty | 65 // Fetches a machine statistic value from StatisticsProvider, returns an empty |
| 66 // string on failure. | 66 // string on failure. |
| 67 std::string GetMachineStatistic(const std::string& key) { | 67 std::string GetMachineStatistic(const std::string& key) { |
| 68 std::string value; | 68 std::string value; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 local_state_->SetBoolean( | 255 local_state_->SetBoolean( |
| 256 prefs::kDeviceEnrollmentCanExit, | 256 prefs::kDeviceEnrollmentCanExit, |
| 257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey, | 257 GetMachineFlag(chromeos::system::kOemCanExitEnterpriseEnrollmentKey, |
| 258 false)); | 258 false)); |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace policy | 264 } // namespace policy |
| OLD | NEW |