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

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

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, remove blocking GetOwnershipStatus() Created 8 years, 4 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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 void ScreenLocker::Authenticate(const string16& password) { 210 void ScreenLocker::Authenticate(const string16& password) {
211 authentication_start_time_ = base::Time::Now(); 211 authentication_start_time_ = base::Time::Now();
212 delegate_->SetInputEnabled(false); 212 delegate_->SetInputEnabled(false);
213 delegate_->OnAuthenticate(); 213 delegate_->OnAuthenticate();
214 214
215 // If LoginPerformer instance exists, 215 // If LoginPerformer instance exists,
216 // initial online login phase is still active. 216 // initial online login phase is still active.
217 if (LoginPerformer::default_performer()) { 217 if (LoginPerformer::default_performer()) {
218 DVLOG(1) << "Delegating authentication to LoginPerformer."; 218 DVLOG(1) << "Delegating authentication to LoginPerformer.";
219 LoginPerformer::default_performer()->Login(user_.email(), 219 LoginPerformer::default_performer()->PerformLogin(
220 UTF16ToUTF8(password)); 220 user_.email(), UTF16ToUTF8(password),
221 LoginPerformer::AUTH_MODE_INTERNAL);
221 } else { 222 } else {
222 BrowserThread::PostTask( 223 BrowserThread::PostTask(
223 BrowserThread::UI, FROM_HERE, 224 BrowserThread::UI, FROM_HERE,
224 base::Bind(&Authenticator::AuthenticateToUnlock, authenticator_.get(), 225 base::Bind(&Authenticator::AuthenticateToUnlock, authenticator_.get(),
225 user_.email(), UTF16ToUTF8(password))); 226 user_.email(), UTF16ToUTF8(password)));
226 } 227 }
227 } 228 }
228 229
229 void ScreenLocker::ClearErrors() { 230 void ScreenLocker::ClearErrors() {
230 delegate_->ClearErrors(); 231 delegate_->ClearErrors();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 bool state = true; 344 bool state = true;
344 content::NotificationService::current()->Notify( 345 content::NotificationService::current()->Notify(
345 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 346 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
346 content::Source<ScreenLocker>(this), 347 content::Source<ScreenLocker>(this),
347 content::Details<bool>(&state)); 348 content::Details<bool>(&state));
348 DBusThreadManager::Get()->GetPowerManagerClient()-> 349 DBusThreadManager::Get()->GetPowerManagerClient()->
349 NotifyScreenLockCompleted(); 350 NotifyScreenLockCompleted();
350 } 351 }
351 352
352 } // namespace chromeos 353 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698