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

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

Issue 2653823004: Do not restart Chrome to apply user flags with stub session manager (Closed)
Patch Set: .\ Created 3 years, 10 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
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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy( 140 void FakeSessionManagerClient::StoreDeviceLocalAccountPolicy(
141 const std::string& account_id, 141 const std::string& account_id,
142 const std::string& policy_blob, 142 const std::string& policy_blob,
143 const StorePolicyCallback& callback) { 143 const StorePolicyCallback& callback) {
144 device_local_account_policy_[account_id] = policy_blob; 144 device_local_account_policy_[account_id] = policy_blob;
145 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 145 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
146 base::Bind(callback, true)); 146 base::Bind(callback, true));
147 } 147 }
148 148
149 bool FakeSessionManagerClient::SupportsRestartToApplyUserFlags() const {
150 return false;
151 }
152
149 void FakeSessionManagerClient::SetFlagsForUser( 153 void FakeSessionManagerClient::SetFlagsForUser(
150 const cryptohome::Identification& cryptohome_id, 154 const cryptohome::Identification& cryptohome_id,
151 const std::vector<std::string>& flags) {} 155 const std::vector<std::string>& flags) {}
152 156
153 void FakeSessionManagerClient::GetServerBackedStateKeys( 157 void FakeSessionManagerClient::GetServerBackedStateKeys(
154 const StateKeysCallback& callback) { 158 const StateKeysCallback& callback) {
155 base::ThreadTaskRunnerHandle::Get()->PostTask( 159 base::ThreadTaskRunnerHandle::Get()->PostTask(
156 FROM_HERE, base::Bind(callback, server_backed_state_keys_)); 160 FROM_HERE, base::Bind(callback, server_backed_state_keys_));
157 } 161 }
158 162
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 const std::string& policy_blob) { 247 const std::string& policy_blob) {
244 device_local_account_policy_[account_id] = policy_blob; 248 device_local_account_policy_[account_id] = policy_blob;
245 } 249 }
246 250
247 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { 251 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) {
248 for (auto& observer : observers_) 252 for (auto& observer : observers_)
249 observer.PropertyChangeComplete(success); 253 observer.PropertyChangeComplete(success);
250 } 254 }
251 255
252 } // namespace chromeos 256 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_session_manager_client.h ('k') | chromeos/dbus/mock_session_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698