Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: chromeos/dbus/fake_session_manager_client.cc

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const std::string& policy_blob, 110 const std::string& policy_blob,
111 const StorePolicyCallback& callback) { 111 const StorePolicyCallback& callback) {
112 device_policy_ = policy_blob; 112 device_policy_ = policy_blob;
113 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true)); 113 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true));
114 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(true)); 114 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(true));
115 } 115 }
116 116
117 void FakeSessionManagerClient::StorePolicyForUser( 117 void FakeSessionManagerClient::StorePolicyForUser(
118 const std::string& username, 118 const std::string& username,
119 const std::string& policy_blob, 119 const std::string& policy_blob,
120 const std::string& policy_key,
121 const StorePolicyCallback& callback) { 120 const StorePolicyCallback& callback) {
122 user_policies_[username] = policy_blob; 121 user_policies_[username] = policy_blob;
123 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true)); 122 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true));
124 } 123 }
125 124
126 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy( 125 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy(
127 const std::string& account_id, 126 const std::string& account_id,
128 const std::string& policy_blob, 127 const std::string& policy_blob,
129 const StorePolicyCallback& callback) { 128 const StorePolicyCallback& callback) {
130 device_local_account_policy_[account_id] = policy_blob; 129 device_local_account_policy_[account_id] = policy_blob;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const std::string& account_id, 168 const std::string& account_id,
170 const std::string& policy_blob) { 169 const std::string& policy_blob) {
171 device_local_account_policy_[account_id] = policy_blob; 170 device_local_account_policy_[account_id] = policy_blob;
172 } 171 }
173 172
174 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { 173 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) {
175 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success)); 174 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success));
176 } 175 }
177 176
178 } // namespace chromeos 177 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698