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

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

Issue 16770002: Restart Chrome if per session flags have been specified on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT and addressed Nico's comments. Created 7 years, 6 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.h" 9 #include "base/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698