| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
| 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()); |
| 190 } |
| 188 #endif | 191 #endif |
| 189 | 192 |
| 190 return EnterpriseInstallAttributes::LOCK_BACKEND_ERROR; | 193 return EnterpriseInstallAttributes::LOCK_BACKEND_ERROR; |
| 191 } | 194 } |
| 192 | 195 |
| 193 // static | 196 // static |
| 194 std::string BrowserPolicyConnector::GetSerialNumber() { | 197 std::string BrowserPolicyConnector::GetSerialNumber() { |
| 195 std::string serial_number; | 198 std::string serial_number; |
| 196 #if defined(OS_CHROMEOS) | 199 #if defined(OS_CHROMEOS) |
| 197 chromeos::system::StatisticsProvider* provider = | 200 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"))); | 513 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
| 511 } else { | 514 } else { |
| 512 return NULL; | 515 return NULL; |
| 513 } | 516 } |
| 514 #else | 517 #else |
| 515 return NULL; | 518 return NULL; |
| 516 #endif | 519 #endif |
| 517 } | 520 } |
| 518 | 521 |
| 519 } // namespace policy | 522 } // namespace policy |
| OLD | NEW |