| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chromeos/dbus/fake_session_manager_client.h" | 5 #include "chromeos/dbus/fake_session_manager_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy( | 121 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy( |
| 122 const std::string& account_id, | 122 const std::string& account_id, |
| 123 const std::string& policy_blob, | 123 const std::string& policy_blob, |
| 124 const StorePolicyCallback& callback) { | 124 const StorePolicyCallback& callback) { |
| 125 device_local_account_policy_[account_id] = policy_blob; | 125 device_local_account_policy_[account_id] = policy_blob; |
| 126 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true)); | 126 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void FakeSessionManagerClient::SetFlagsForUser( |
| 130 const std::string& username, |
| 131 const std::vector<std::string>& flags) { |
| 132 } |
| 133 |
| 129 const std::string& FakeSessionManagerClient::device_policy() const { | 134 const std::string& FakeSessionManagerClient::device_policy() const { |
| 130 return device_policy_; | 135 return device_policy_; |
| 131 } | 136 } |
| 132 | 137 |
| 133 void FakeSessionManagerClient::set_device_policy( | 138 void FakeSessionManagerClient::set_device_policy( |
| 134 const std::string& policy_blob) { | 139 const std::string& policy_blob) { |
| 135 device_policy_ = policy_blob; | 140 device_policy_ = policy_blob; |
| 136 } | 141 } |
| 137 | 142 |
| 138 const std::string& FakeSessionManagerClient::user_policy( | 143 const std::string& FakeSessionManagerClient::user_policy( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 159 const std::string& account_id, | 164 const std::string& account_id, |
| 160 const std::string& policy_blob) { | 165 const std::string& policy_blob) { |
| 161 device_local_account_policy_[account_id] = policy_blob; | 166 device_local_account_policy_[account_id] = policy_blob; |
| 162 } | 167 } |
| 163 | 168 |
| 164 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { | 169 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { |
| 165 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success)); | 170 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success)); |
| 166 } | 171 } |
| 167 | 172 |
| 168 } // namespace chromeos | 173 } // namespace chromeos |
| OLD | NEW |