| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/device_policy_identity_strategy.h" | 5 #include "chrome/browser/policy/device_policy_identity_strategy.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chromeos/cros/cros_library.h" | 8 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 9 #include "chrome/browser/chromeos/login/ownership_service.h" | 9 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 10 #include "chrome/browser/chromeos/login/user_manager.h" | 10 #include "chrome/browser/chromeos/login/user_manager.h" |
| 11 #include "chrome/browser/chromeos/system_access.h" | 11 #include "chrome/browser/chromeos/system_access.h" |
| 12 #include "chrome/browser/net/gaia/token_service.h" | 12 #include "chrome/browser/net/gaia/token_service.h" |
| 13 #include "chrome/browser/policy/proto/device_management_constants.h" | 13 #include "chrome/browser/policy/proto/device_management_constants.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/common/guid.h" | 16 #include "chrome/common/guid.h" |
| 17 #include "chrome/common/net/gaia/gaia_constants.h" | 17 #include "chrome/common/net/gaia/gaia_constants.h" |
| 18 #include "content/common/content_notification_types.h" |
| 18 #include "content/common/notification_service.h" | 19 #include "content/common/notification_service.h" |
| 19 #include "content/common/notification_type.h" | |
| 20 | 20 |
| 21 // MachineInfo key names. | 21 // MachineInfo key names. |
| 22 static const char kMachineInfoSystemHwqual[] = "hardware_class"; | 22 static const char kMachineInfoSystemHwqual[] = "hardware_class"; |
| 23 static const char kMachineInfoSerialNumber[] = "serial_number"; | 23 static const char kMachineInfoSerialNumber[] = "serial_number"; |
| 24 | 24 |
| 25 namespace policy { | 25 namespace policy { |
| 26 | 26 |
| 27 DevicePolicyIdentityStrategy::DevicePolicyIdentityStrategy() { | 27 DevicePolicyIdentityStrategy::DevicePolicyIdentityStrategy() { |
| 28 chromeos::SystemAccess* sys_lib = chromeos::SystemAccess::GetInstance(); | 28 chromeos::SystemAccess* sys_lib = chromeos::SystemAccess::GetInstance(); |
| 29 | 29 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 return !username->empty() && !auth_token->empty(); | 97 return !username->empty() && !auth_token->empty(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void DevicePolicyIdentityStrategy::OnDeviceTokenAvailable( | 100 void DevicePolicyIdentityStrategy::OnDeviceTokenAvailable( |
| 101 const std::string& token) { | 101 const std::string& token) { |
| 102 device_token_ = token; | 102 device_token_ = token; |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace policy | 105 } // namespace policy |
| OLD | NEW |