OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/managed_mode/managed_user_registration_service.h" | 5 #include "chrome/browser/managed_mode/managed_user_registration_service.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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::Bind(&ManagedUserRegistrationService::OnLastSignedInUsernameChange, | 82 base::Bind(&ManagedUserRegistrationService::OnLastSignedInUsernameChange, |
83 base::Unretained(this))); | 83 base::Unretained(this))); |
84 } | 84 } |
85 | 85 |
86 ManagedUserRegistrationService::~ManagedUserRegistrationService() { | 86 ManagedUserRegistrationService::~ManagedUserRegistrationService() { |
87 DCHECK(pending_managed_user_id_.empty()); | 87 DCHECK(pending_managed_user_id_.empty()); |
88 DCHECK(callback_.is_null()); | 88 DCHECK(callback_.is_null()); |
89 } | 89 } |
90 | 90 |
91 // static | 91 // static |
92 void ManagedUserRegistrationService::RegisterUserPrefs( | 92 void ManagedUserRegistrationService::RegisterProfilePrefs( |
93 PrefRegistrySyncable* registry) { | 93 PrefRegistrySyncable* registry) { |
94 registry->RegisterDictionaryPref(prefs::kManagedUsers, | 94 registry->RegisterDictionaryPref(prefs::kManagedUsers, |
95 PrefRegistrySyncable::UNSYNCABLE_PREF); | 95 PrefRegistrySyncable::UNSYNCABLE_PREF); |
96 } | 96 } |
97 | 97 |
98 void ManagedUserRegistrationService::Register( | 98 void ManagedUserRegistrationService::Register( |
99 const ManagedUserRegistrationInfo& info, | 99 const ManagedUserRegistrationInfo& info, |
100 const RegistrationCallback& callback) { | 100 const RegistrationCallback& callback) { |
101 DCHECK(pending_managed_user_id_.empty()); | 101 DCHECK(pending_managed_user_id_.empty()); |
102 DCHECK(!registration_timer_.IsRunning()); | 102 DCHECK(!registration_timer_.IsRunning()); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 download_callback_.Run(downloader->GetProfileFullName()); | 441 download_callback_.Run(downloader->GetProfileFullName()); |
442 OnProfileDownloadComplete(); | 442 OnProfileDownloadComplete(); |
443 } | 443 } |
444 | 444 |
445 void ManagedUserRegistrationService::OnProfileDownloadFailure( | 445 void ManagedUserRegistrationService::OnProfileDownloadFailure( |
446 ProfileDownloader* downloader, | 446 ProfileDownloader* downloader, |
447 ProfileDownloaderDelegate::FailureReason reason) { | 447 ProfileDownloaderDelegate::FailureReason reason) { |
448 // Ignore failures; proceed without the custodian's name. | 448 // Ignore failures; proceed without the custodian's name. |
449 OnProfileDownloadComplete(); | 449 OnProfileDownloadComplete(); |
450 } | 450 } |
OLD | NEW |