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

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

Issue 23694025: Remove calls to deprecated session_manager DBus methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use-after-free in tests. Created 7 years, 3 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 30 matching lines...) Expand all
41 emit_login_prompt_ready_call_count_++; 41 emit_login_prompt_ready_call_count_++;
42 } 42 }
43 43
44 void FakeSessionManagerClient::EmitLoginPromptVisible() { 44 void FakeSessionManagerClient::EmitLoginPromptVisible() {
45 } 45 }
46 46
47 void FakeSessionManagerClient::RestartJob(int pid, 47 void FakeSessionManagerClient::RestartJob(int pid,
48 const std::string& command_line) { 48 const std::string& command_line) {
49 } 49 }
50 50
51 void FakeSessionManagerClient::RestartEntd() {
52 }
53
54 void FakeSessionManagerClient::StartSession(const std::string& user_email) { 51 void FakeSessionManagerClient::StartSession(const std::string& user_email) {
55 DCHECK_EQ(0UL, user_sessions_.count(user_email)); 52 DCHECK_EQ(0UL, user_sessions_.count(user_email));
56 std::string user_id_hash = 53 std::string user_id_hash =
57 CryptohomeClient::GetStubSanitizedUsername(user_email); 54 CryptohomeClient::GetStubSanitizedUsername(user_email);
58 user_sessions_[user_email] = user_id_hash; 55 user_sessions_[user_email] = user_id_hash;
59 } 56 }
60 57
61 void FakeSessionManagerClient::StopSession() { 58 void FakeSessionManagerClient::StopSession() {
62 } 59 }
63 60
64 void FakeSessionManagerClient::StartDeviceWipe() { 61 void FakeSessionManagerClient::StartDeviceWipe() {
65 start_device_wipe_call_count_++; 62 start_device_wipe_call_count_++;
66 } 63 }
67 64
68 void FakeSessionManagerClient::RequestLockScreen() { 65 void FakeSessionManagerClient::RequestLockScreen() {
69 } 66 }
70 67
71 void FakeSessionManagerClient::NotifyLockScreenShown() { 68 void FakeSessionManagerClient::NotifyLockScreenShown() {
72 notify_lock_screen_shown_call_count_++; 69 notify_lock_screen_shown_call_count_++;
73 } 70 }
74 71
75 void FakeSessionManagerClient::RequestUnlockScreen() {
76 }
77
78 void FakeSessionManagerClient::NotifyLockScreenDismissed() { 72 void FakeSessionManagerClient::NotifyLockScreenDismissed() {
79 notify_lock_screen_dismissed_call_count_++; 73 notify_lock_screen_dismissed_call_count_++;
80 } 74 }
81 75
82 void FakeSessionManagerClient::RetrieveActiveSessions( 76 void FakeSessionManagerClient::RetrieveActiveSessions(
83 const ActiveSessionsCallback& callback) { 77 const ActiveSessionsCallback& callback) {
84 base::MessageLoop::current()->PostTask( 78 base::MessageLoop::current()->PostTask(
85 FROM_HERE, base::Bind(callback, user_sessions_, true)); 79 FROM_HERE, base::Bind(callback, user_sessions_, true));
86 } 80 }
87 81
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const std::string& account_id, 168 const std::string& account_id,
175 const std::string& policy_blob) { 169 const std::string& policy_blob) {
176 device_local_account_policy_[account_id] = policy_blob; 170 device_local_account_policy_[account_id] = policy_blob;
177 } 171 }
178 172
179 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) { 173 void FakeSessionManagerClient::OnPropertyChangeComplete(bool success) {
180 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success)); 174 FOR_EACH_OBSERVER(Observer, observers_, PropertyChangeComplete(success));
181 } 175 }
182 176
183 } // namespace chromeos 177 } // 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