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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/supervised_user_service.h" 5 #include "chrome/browser/supervised_user/supervised_user_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 844
845 FOR_EACH_OBSERVER( 845 FOR_EACH_OBSERVER(
846 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); 846 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged());
847 } 847 }
848 848
849 std::string SupervisedUserService::GetSupervisedUserName() const { 849 std::string SupervisedUserService::GetSupervisedUserName() const {
850 #if defined(OS_CHROMEOS) 850 #if defined(OS_CHROMEOS)
851 // The active user can be NULL in unit tests. 851 // The active user can be NULL in unit tests.
852 if (user_manager::UserManager::Get()->GetActiveUser()) { 852 if (user_manager::UserManager::Get()->GetActiveUser()) {
853 return UTF16ToUTF8(user_manager::UserManager::Get()->GetUserDisplayName( 853 return UTF16ToUTF8(user_manager::UserManager::Get()->GetUserDisplayName(
854 user_manager::UserManager::Get()->GetActiveUser()->GetUserID())); 854 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()));
855 } 855 }
856 return std::string(); 856 return std::string();
857 #else 857 #else
858 return profile_->GetPrefs()->GetString(prefs::kProfileName); 858 return profile_->GetPrefs()->GetString(prefs::kProfileName);
859 #endif 859 #endif
860 } 860 }
861 861
862 void SupervisedUserService::OnHistoryRecordingStateChanged() { 862 void SupervisedUserService::OnHistoryRecordingStateChanged() {
863 bool record_history = 863 bool record_history =
864 profile_->GetPrefs()->GetBoolean(prefs::kRecordHistory); 864 profile_->GetPrefs()->GetBoolean(prefs::kRecordHistory);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 995
996 is_profile_active_ = profile_became_active; 996 is_profile_active_ = profile_became_active;
997 } 997 }
998 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 998 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
999 999
1000 void SupervisedUserService::OnSiteListUpdated() { 1000 void SupervisedUserService::OnSiteListUpdated() {
1001 FOR_EACH_OBSERVER( 1001 FOR_EACH_OBSERVER(
1002 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); 1002 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged());
1003 } 1003 }
1004 1004
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/chromeos/manager_password_service.cc ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698