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/supervised_user/legacy/supervised_user_registration_uti
lity.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 supervised_user_sync_service_->UpdateSupervisedUserAvatarIfNeeded( | 284 supervised_user_sync_service_->UpdateSupervisedUserAvatarIfNeeded( |
285 supervised_user_id, | 285 supervised_user_id, |
286 info.avatar_index); | 286 info.avatar_index); |
287 } | 287 } |
288 #if defined(OS_CHROMEOS) | 288 #if defined(OS_CHROMEOS) |
289 const char* kAvatarKey = supervised_users::kChromeOSAvatarIndex; | 289 const char* kAvatarKey = supervised_users::kChromeOSAvatarIndex; |
290 #else | 290 #else |
291 const char* kAvatarKey = supervised_users::kChromeAvatarIndex; | 291 const char* kAvatarKey = supervised_users::kChromeAvatarIndex; |
292 #endif | 292 #endif |
293 supervised_user_shared_settings_service_->SetValue( | 293 supervised_user_shared_settings_service_->SetValue( |
294 pending_supervised_user_id_, kAvatarKey, | 294 pending_supervised_user_id_, kAvatarKey, base::Value(info.avatar_index)); |
295 base::FundamentalValue(info.avatar_index)); | |
296 if (need_password_update) { | 295 if (need_password_update) { |
297 password_update_.reset(new SupervisedUserSharedSettingsUpdate( | 296 password_update_.reset(new SupervisedUserSharedSettingsUpdate( |
298 supervised_user_shared_settings_service_, pending_supervised_user_id_, | 297 supervised_user_shared_settings_service_, pending_supervised_user_id_, |
299 supervised_users::kChromeOSPasswordData, | 298 supervised_users::kChromeOSPasswordData, |
300 std::unique_ptr<base::Value>(info.password_data.DeepCopy()), | 299 std::unique_ptr<base::Value>(info.password_data.DeepCopy()), |
301 base::Bind(&SupervisedUserRegistrationUtilityImpl:: | 300 base::Bind(&SupervisedUserRegistrationUtilityImpl:: |
302 OnPasswordChangeAcknowledged, | 301 OnPasswordChangeAcknowledged, |
303 weak_ptr_factory_.GetWeakPtr()))); | 302 weak_ptr_factory_.GetWeakPtr()))); |
304 } | 303 } |
305 | 304 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 pending_supervised_user_id_); | 407 pending_supervised_user_id_); |
409 } | 408 } |
410 } | 409 } |
411 | 410 |
412 if (run_callback) | 411 if (run_callback) |
413 callback_.Run(error, pending_supervised_user_token_); | 412 callback_.Run(error, pending_supervised_user_token_); |
414 callback_.Reset(); | 413 callback_.Reset(); |
415 } | 414 } |
416 | 415 |
417 } // namespace | 416 } // namespace |
OLD | NEW |