OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/supervised/supervised_user_creation_cont
roller_new.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller_new.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 weak_factory_.GetWeakPtr())); | 300 weak_factory_.GetWeakPtr())); |
301 } | 301 } |
302 | 302 |
303 void SupervisedUserCreationControllerNew::OnAddKeySuccess() { | 303 void SupervisedUserCreationControllerNew::OnAddKeySuccess() { |
304 DCHECK(creation_context_); | 304 DCHECK(creation_context_); |
305 DCHECK_EQ(KEYS_GENERATED, stage_); | 305 DCHECK_EQ(KEYS_GENERATED, stage_); |
306 stage_ = CRYPTOHOME_CREATED; | 306 stage_ = CRYPTOHOME_CREATED; |
307 | 307 |
308 VLOG(1) << " Phase 3 : Create/update user on chrome.com/manage"; | 308 VLOG(1) << " Phase 3 : Create/update user on chrome.com/manage"; |
309 | 309 |
310 ProfileSyncService* sync_service = | 310 browser_sync::ProfileSyncService* sync_service = |
311 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 311 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
312 creation_context_->manager_profile); | 312 creation_context_->manager_profile); |
313 ProfileSyncService::SyncStatusSummary status = | 313 browser_sync::ProfileSyncService::SyncStatusSummary status = |
314 sync_service->QuerySyncStatusSummary(); | 314 sync_service->QuerySyncStatusSummary(); |
315 | 315 |
316 if (status == ProfileSyncService::DATATYPES_NOT_INITIALIZED) | 316 if (status == browser_sync::ProfileSyncService::DATATYPES_NOT_INITIALIZED) |
317 consumer_->OnLongCreationWarning(); | 317 consumer_->OnLongCreationWarning(); |
318 | 318 |
319 creation_context_->registration_utility = | 319 creation_context_->registration_utility = |
320 SupervisedUserRegistrationUtility::Create( | 320 SupervisedUserRegistrationUtility::Create( |
321 creation_context_->manager_profile); | 321 creation_context_->manager_profile); |
322 | 322 |
323 SupervisedUserRegistrationInfo info(creation_context_->display_name, | 323 SupervisedUserRegistrationInfo info(creation_context_->display_name, |
324 creation_context_->avatar_index); | 324 creation_context_->avatar_index); |
325 info.master_key = creation_context_->master_key; | 325 info.master_key = creation_context_->master_key; |
326 info.password_signature_key = creation_context_->signature_key; | 326 info.password_signature_key = creation_context_->signature_key; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 creation_context_->registration_utility.reset(); | 414 creation_context_->registration_utility.reset(); |
415 chrome::AttemptUserExit(); | 415 chrome::AttemptUserExit(); |
416 } | 416 } |
417 | 417 |
418 std::string SupervisedUserCreationControllerNew::GetSupervisedUserId() { | 418 std::string SupervisedUserCreationControllerNew::GetSupervisedUserId() { |
419 DCHECK(creation_context_); | 419 DCHECK(creation_context_); |
420 return creation_context_->local_user_id; | 420 return creation_context_->local_user_id; |
421 } | 421 } |
422 | 422 |
423 } // namespace chromeos | 423 } // namespace chromeos |
OLD | NEW |