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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/login_performer.h" 5 #include "chrome/browser/chromeos/login/login_performer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 } 210 }
211 211
212 //////////////////////////////////////////////////////////////////////////////// 212 ////////////////////////////////////////////////////////////////////////////////
213 // LoginPerformer, NotificationObserver implementation: 213 // LoginPerformer, NotificationObserver implementation:
214 // 214 //
215 215
216 void LoginPerformer::Observe(NotificationType type, 216 void LoginPerformer::Observe(NotificationType type,
217 const NotificationSource& source, 217 const NotificationSource& source,
218 const NotificationDetails& details) { 218 const NotificationDetails& details) {
219 if (type != NotificationType::SCREEN_LOCK_STATE_CHANGED) 219 if (type != chrome::SCREEN_LOCK_STATE_CHANGED)
220 return; 220 return;
221 221
222 bool is_screen_locked = *Details<bool>(details).ptr(); 222 bool is_screen_locked = *Details<bool>(details).ptr();
223 if (is_screen_locked) { 223 if (is_screen_locked) {
224 if (screen_lock_requested_) { 224 if (screen_lock_requested_) {
225 screen_lock_requested_ = false; 225 screen_lock_requested_ = false;
226 ResolveScreenLocked(); 226 ResolveScreenLocked();
227 } 227 }
228 } else { 228 } else {
229 ResolveScreenUnlocked(); 229 ResolveScreenUnlocked();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 cached_credentials_ = GaiaAuthConsumer::ClientLoginResult(); 307 cached_credentials_ = GaiaAuthConsumer::ClientLoginResult();
308 } 308 }
309 309
310 //////////////////////////////////////////////////////////////////////////////// 310 ////////////////////////////////////////////////////////////////////////////////
311 // LoginPerformer, private: 311 // LoginPerformer, private:
312 312
313 void LoginPerformer::RequestScreenLock() { 313 void LoginPerformer::RequestScreenLock() {
314 DVLOG(1) << "Screen lock requested"; 314 DVLOG(1) << "Screen lock requested";
315 // Will receive notifications on screen unlock and delete itself. 315 // Will receive notifications on screen unlock and delete itself.
316 registrar_.Add(this, 316 registrar_.Add(this,
317 NotificationType::SCREEN_LOCK_STATE_CHANGED, 317 chrome::SCREEN_LOCK_STATE_CHANGED,
318 NotificationService::AllSources()); 318 NotificationService::AllSources());
319 if (ScreenLocker::default_screen_locker()) { 319 if (ScreenLocker::default_screen_locker()) {
320 DVLOG(1) << "Screen already locked"; 320 DVLOG(1) << "Screen already locked";
321 ResolveScreenLocked(); 321 ResolveScreenLocked();
322 } else { 322 } else {
323 screen_lock_requested_ = true; 323 screen_lock_requested_ = true;
324 chromeos::CrosLibrary::Get()->GetScreenLockLibrary()-> 324 chromeos::CrosLibrary::Get()->GetScreenLockLibrary()->
325 NotifyScreenLockRequested(); 325 NotifyScreenLockRequested();
326 } 326 }
327 } 327 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 profile, 487 profile,
488 username_, 488 username_,
489 password_, 489 password_,
490 captcha_token_, 490 captcha_token_,
491 captcha_)); 491 captcha_));
492 } 492 }
493 password_.clear(); 493 password_.clear();
494 } 494 }
495 495
496 } // namespace chromeos 496 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698