| 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/policy/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 return install_attributes_.get() && install_attributes_->IsEnterpriseDevice(); | 177 return install_attributes_.get() && install_attributes_->IsEnterpriseDevice(); |
| 178 #else | 178 #else |
| 179 return false; | 179 return false; |
| 180 #endif | 180 #endif |
| 181 } | 181 } |
| 182 | 182 |
| 183 EnterpriseInstallAttributes::LockResult | 183 EnterpriseInstallAttributes::LockResult |
| 184 BrowserPolicyConnector::LockDevice(const std::string& user) { | 184 BrowserPolicyConnector::LockDevice(const std::string& user) { |
| 185 #if defined(OS_CHROMEOS) | 185 #if defined(OS_CHROMEOS) |
| 186 if (install_attributes_.get()) | 186 if (install_attributes_.get()) |
| 187 return install_attributes_->LockDevice(user); | 187 return install_attributes_->LockDevice(user, |
| 188 device_data_store_->device_mode(), |
| 189 device_data_store_->device_id()); |
| 188 #endif | 190 #endif |
| 189 | 191 |
| 190 return EnterpriseInstallAttributes::LOCK_BACKEND_ERROR; | 192 return EnterpriseInstallAttributes::LOCK_BACKEND_ERROR; |
| 191 } | 193 } |
| 192 | 194 |
| 193 // static | 195 // static |
| 194 std::string BrowserPolicyConnector::GetSerialNumber() { | 196 std::string BrowserPolicyConnector::GetSerialNumber() { |
| 195 std::string serial_number; | 197 std::string serial_number; |
| 196 #if defined(OS_CHROMEOS) | 198 #if defined(OS_CHROMEOS) |
| 197 chromeos::system::StatisticsProvider* provider = | 199 chromeos::system::StatisticsProvider* provider = |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); | 512 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
| 511 } else { | 513 } else { |
| 512 return NULL; | 514 return NULL; |
| 513 } | 515 } |
| 514 #else | 516 #else |
| 515 return NULL; | 517 return NULL; |
| 516 #endif | 518 #endif |
| 517 } | 519 } |
| 518 | 520 |
| 519 } // namespace policy | 521 } // namespace policy |
| OLD | NEW |