Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/supervised_user/child_accounts/child_account_service.cc

Issue 790503002: Methods and types rename for child accounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698