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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 167663004: chromeos: Remove old LockScreen signal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: surprise: old chunk mismatch Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/login/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 case chrome::NOTIFICATION_SESSION_STARTED: { 100 case chrome::NOTIFICATION_SESSION_STARTED: {
101 session_started_ = true; 101 session_started_ = true;
102 break; 102 break;
103 } 103 }
104 104
105 default: 105 default:
106 NOTREACHED(); 106 NOTREACHED();
107 } 107 }
108 } 108 }
109 109
110 // TODO(derat): Remove this once the session manager is calling the LockScreen
111 // method instead of emitting a signal.
112 virtual void LockScreen() OVERRIDE {
113 VLOG(1) << "Received LockScreen D-Bus signal from session manager";
114 ScreenLocker::HandleLockScreenRequest();
115 }
116
117 virtual void OnUserAddingFinished() OVERRIDE { 110 virtual void OnUserAddingFinished() OVERRIDE {
118 UserAddingScreen::Get()->RemoveObserver(this); 111 UserAddingScreen::Get()->RemoveObserver(this);
119 LockScreen(); 112 ScreenLocker::HandleLockScreenRequest();
120 } 113 }
121 114
122 private: 115 private:
123 bool session_started_; 116 bool session_started_;
124 content::NotificationRegistrar registrar_; 117 content::NotificationRegistrar registrar_;
125 118
126 DISALLOW_COPY_AND_ASSIGN(ScreenLockObserver); 119 DISALLOW_COPY_AND_ASSIGN(ScreenLockObserver);
127 }; 120 };
128 121
129 static base::LazyInstance<ScreenLockObserver> g_screen_lock_observer = 122 static base::LazyInstance<ScreenLockObserver> g_screen_lock_observer =
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 468
476 bool ScreenLocker::IsUserLoggedIn(const std::string& username) { 469 bool ScreenLocker::IsUserLoggedIn(const std::string& username) {
477 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) { 470 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) {
478 if ((*it)->email() == username) 471 if ((*it)->email() == username)
479 return true; 472 return true;
480 } 473 }
481 return false; 474 return false;
482 } 475 }
483 476
484 } // namespace chromeos 477 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/power_button_observer.h » ('j') | chromeos/dbus/session_manager_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698