| Index: chrome/browser/chromeos/login/owner_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc
|
| index 389d0a82698fc6512fdb7c0f19566322ce5088f1..6be926442fcac83973efe10b3bf4760da4287dcd 100644
|
| --- a/chrome/browser/chromeos/login/owner_manager.cc
|
| +++ b/chrome/browser/chromeos/login/owner_manager.cc
|
| @@ -49,74 +49,6 @@ void OwnerManager::LoadOwnerKey() {
|
| NotificationService::NoDetails()));
|
| }
|
|
|
| -void OwnerManager::GenerateKeysAndExportPublic() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
|
| - VLOG(1) << "Generating key pair";
|
| -
|
| - private_key_.reset(utils_->GenerateKeyPair());
|
| -
|
| - if (private_key_.get() && private_key_->ExportPublicKey(&public_key_)) {
|
| - // If we generated the keys successfully, export them.
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - NewRunnableMethod(this, &OwnerManager::ExportKey));
|
| - } else {
|
| - private_key_.reset(NULL);
|
| - // If we didn't generate the key, send along a notification of failure.
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - NewRunnableMethod(this,
|
| - &OwnerManager::SendNotification,
|
| - NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED,
|
| - NotificationService::NoDetails()));
|
| - }
|
| -}
|
| -
|
| -void OwnerManager::ExportKey() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - VLOG(1) << "Exporting public key";
|
| - if (utils_->ExportPublicKeyViaDbus(private_key_.get(), this)) {
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - NewRunnableMethod(this,
|
| - &OwnerManager::SendNotification,
|
| - NotificationType::OWNERSHIP_TAKEN,
|
| - NotificationService::NoDetails()));
|
| - } else {
|
| - private_key_.reset(NULL);
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - NewRunnableMethod(this,
|
| - &OwnerManager::SendNotification,
|
| - NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED,
|
| - NotificationService::NoDetails()));
|
| - }
|
| - BootTimesLoader::Get()->AddLoginTimeMarker("ExportKeyEnd", false);
|
| -}
|
| -
|
| -void OwnerManager::OnComplete(bool value) {
|
| - VLOG(1) << "Export public key attempt: " << (value ? "success" : "fail");
|
| - NotificationType result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED;
|
| - if (!value)
|
| - result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED;
|
| -
|
| - // Whether we exported the public key or not, send a notification indicating
|
| - // that we're done with this attempt.
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI, FROM_HERE,
|
| - NewRunnableMethod(this,
|
| - &OwnerManager::SendNotification,
|
| - result,
|
| - NotificationService::NoDetails()));
|
| - // We've stored some settings in transient storage
|
| - // before owner has been assigned.
|
| - // Now owner is assigned and key is generated and we should persist
|
| - // those settings into signed storage.
|
| - if (g_browser_process && g_browser_process->local_state()) {
|
| - SignedSettingsTempStorage::Finalize(g_browser_process->local_state());
|
| - }
|
| -}
|
| -
|
| bool OwnerManager::EnsurePublicKey() {
|
| if (public_key_.empty())
|
| LoadOwnerKey();
|
|
|