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/child_accounts/child_account_service.h" | 5 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 profile_->GetPrefs()->SetString(prefs::kSupervisedUserId, | 287 profile_->GetPrefs()->SetString(prefs::kSupervisedUserId, |
288 kChildAccountSUID); | 288 kChildAccountSUID); |
289 } else { | 289 } else { |
290 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserId); | 290 profile_->GetPrefs()->ClearPref(prefs::kSupervisedUserId); |
291 } | 291 } |
292 PropagateChildStatusToUser(is_child_account); | 292 PropagateChildStatusToUser(is_child_account); |
293 } | 293 } |
294 | 294 |
295 void ChildAccountService::PropagateChildStatusToUser(bool is_child) { | 295 void ChildAccountService::PropagateChildStatusToUser(bool is_child) { |
296 #if defined(OS_CHROMEOS) | 296 #if defined(OS_CHROMEOS) |
297 // TODO(merkulova,treib): Figure out why this causes tests to fail. | 297 user_manager::User* user = |
Marc Treib
2014/12/08 13:27:54
This'll need a rebase on top of https://codereview
merkulova
2014/12/08 14:56:12
Definitely it won't be committed until that CL lan
Marc Treib
2014/12/08 15:00:29
Nah that's fine, just rebase when that one has lan
| |
298 // user_manager::User* user = | 298 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); |
299 // chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); | 299 if (user) { |
300 // if (user) { | 300 user_manager::UserManager::Get()->ChangeUserChildStatus(user, is_child); |
301 // user_manager::UserManager::Get()->ChangeUserSupervisedStatus( | 301 } else { |
302 // user, is_child); | 302 LOG(WARNING) << |
303 // } else { | 303 "User instance wasn't found while setting child account flag."; |
304 // LOG(WARNING) << | 304 } |
305 // "User instance wasn't found while setting child account flag."; | |
306 // } | |
307 #endif | 305 #endif |
308 } | 306 } |
OLD | NEW |