| 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/cloud_policy_data_store.h" | 5 #include "chrome/browser/policy/cloud_policy_data_store.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/policy/proto/device_management_backend.pb.h" | 9 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 void CloudPolicyDataStore::set_user_name(const std::string& user_name) { | 101 void CloudPolicyDataStore::set_user_name(const std::string& user_name) { |
| 102 user_name_ = user_name; | 102 user_name_ = user_name; |
| 103 } | 103 } |
| 104 | 104 |
| 105 void CloudPolicyDataStore::set_user_affiliation( | 105 void CloudPolicyDataStore::set_user_affiliation( |
| 106 UserAffiliation user_affiliation) { | 106 UserAffiliation user_affiliation) { |
| 107 user_affiliation_ = user_affiliation; | 107 user_affiliation_ = user_affiliation; |
| 108 } | 108 } |
| 109 | 109 |
| 110 void CloudPolicyDataStore::set_device_mode( |
| 111 em::DeviceRegisterResponse_DeviceMode device_mode) { |
| 112 device_mode_ = device_mode; |
| 113 } |
| 114 |
| 110 void CloudPolicyDataStore::set_known_machine_id(bool known_machine_id) { | 115 void CloudPolicyDataStore::set_known_machine_id(bool known_machine_id) { |
| 111 known_machine_id_ = known_machine_id; | 116 known_machine_id_ = known_machine_id; |
| 112 } | 117 } |
| 113 | 118 |
| 114 const std::string& CloudPolicyDataStore::device_token() const { | 119 const std::string& CloudPolicyDataStore::device_token() const { |
| 115 return device_token_; | 120 return device_token_; |
| 116 } | 121 } |
| 117 | 122 |
| 118 const std::string& CloudPolicyDataStore::gaia_token() const { | 123 const std::string& CloudPolicyDataStore::gaia_token() const { |
| 119 return gaia_token_; | 124 return gaia_token_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 149 } | 154 } |
| 150 | 155 |
| 151 const std::string& CloudPolicyDataStore::user_name() const { | 156 const std::string& CloudPolicyDataStore::user_name() const { |
| 152 return user_name_; | 157 return user_name_; |
| 153 } | 158 } |
| 154 | 159 |
| 155 UserAffiliation CloudPolicyDataStore::user_affiliation() const { | 160 UserAffiliation CloudPolicyDataStore::user_affiliation() const { |
| 156 return user_affiliation_; | 161 return user_affiliation_; |
| 157 } | 162 } |
| 158 | 163 |
| 164 em::DeviceRegisterResponse_DeviceMode |
| 165 CloudPolicyDataStore::device_mode() const { |
| 166 return device_mode_; |
| 167 } |
| 168 |
| 159 bool CloudPolicyDataStore::known_machine_id() const { | 169 bool CloudPolicyDataStore::known_machine_id() const { |
| 160 return known_machine_id_; | 170 return known_machine_id_; |
| 161 } | 171 } |
| 162 | 172 |
| 163 #if defined(OS_CHROMEOS) | 173 #if defined(OS_CHROMEOS) |
| 164 DeviceStatusCollector* | 174 DeviceStatusCollector* |
| 165 CloudPolicyDataStore::device_status_collector() { | 175 CloudPolicyDataStore::device_status_collector() { |
| 166 return device_status_collector_.get(); | 176 return device_status_collector_.get(); |
| 167 } | 177 } |
| 168 | 178 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 184 | 194 |
| 185 void CloudPolicyDataStore::NotifyCredentialsChanged() { | 195 void CloudPolicyDataStore::NotifyCredentialsChanged() { |
| 186 FOR_EACH_OBSERVER(Observer, observer_list_, OnCredentialsChanged()); | 196 FOR_EACH_OBSERVER(Observer, observer_list_, OnCredentialsChanged()); |
| 187 } | 197 } |
| 188 | 198 |
| 189 void CloudPolicyDataStore::NotifyDeviceTokenChanged() { | 199 void CloudPolicyDataStore::NotifyDeviceTokenChanged() { |
| 190 FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceTokenChanged()); | 200 FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceTokenChanged()); |
| 191 } | 201 } |
| 192 | 202 |
| 193 } // namespace policy | 203 } // namespace policy |
| OLD | NEW |