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