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

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

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « chrome_frame/test/test_with_web_server.h ('k') | chromeos/disks/disk_mount_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 void FakeSessionManagerClient::set_device_policy( 142 void FakeSessionManagerClient::set_device_policy(
143 const std::string& policy_blob) { 143 const std::string& policy_blob) {
144 device_policy_ = policy_blob; 144 device_policy_ = policy_blob;
145 } 145 }
146 146
147 const std::string& FakeSessionManagerClient::user_policy( 147 const std::string& FakeSessionManagerClient::user_policy(
148 const std::string& username) const { 148 const std::string& username) const {
149 std::map<std::string, std::string>::const_iterator it = 149 std::map<std::string, std::string>::const_iterator it =
150 user_policies_.find(username); 150 user_policies_.find(username);
151 return it == user_policies_.end() ? EmptyString() : it->second; 151 return it == user_policies_.end() ? base::EmptyString() : it->second;
152 } 152 }
153 153
154 void FakeSessionManagerClient::set_user_policy(const std::string& username, 154 void FakeSessionManagerClient::set_user_policy(const std::string& username,
155 const std::string& policy_blob) { 155 const std::string& policy_blob) {
156 user_policies_[username] = policy_blob; 156 user_policies_[username] = policy_blob;
157 } 157 }
158 158
159 const std::string& FakeSessionManagerClient::device_local_account_policy( 159 const std::string& FakeSessionManagerClient::device_local_account_policy(
160 const std::string& account_id) const { 160 const std::string& account_id) const {
161 std::map<std::string, std::string>::const_iterator entry = 161 std::map<std::string, std::string>::const_iterator entry =
162 device_local_account_policy_.find(account_id); 162 device_local_account_policy_.find(account_id);
163 return entry != device_local_account_policy_.end() ? entry->second 163 return entry != device_local_account_policy_.end() ? entry->second
164 : EmptyString(); 164 : base::EmptyString();
165 } 165 }
166 166
167 void FakeSessionManagerClient::set_device_local_account_policy( 167 void FakeSessionManagerClient::set_device_local_account_policy(
168 const std::string& account_id, 168 const std::string& account_id,
169 const std::string& policy_blob) { 169 const std::string& policy_blob) {
170 device_local_account_policy_[account_id] = policy_blob; 170 device_local_account_policy_[account_id] = policy_blob;
171 } 171 }
172 172
173 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { 173 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) {
174 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success)); 174 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success));
175 } 175 }
176 176
177 } // namespace chromeos 177 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome_frame/test/test_with_web_server.h ('k') | chromeos/disks/disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698