| 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_sync_service.h" | 5 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/prefs/scoped_user_pref_update.h" | |
| 14 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 16 #include "base/values.h" | 15 #include "base/values.h" |
| 17 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 18 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 20 #include "chrome/browser/signin/signin_manager_factory.h" | 19 #include "chrome/browser/signin/signin_manager_factory.h" |
| 21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 22 #include "components/pref_registry/pref_registry_syncable.h" | 21 #include "components/pref_registry/pref_registry_syncable.h" |
| 22 #include "components/prefs/scoped_user_pref_update.h" |
| 23 #include "components/signin/core/browser/signin_manager.h" | 23 #include "components/signin/core/browser/signin_manager.h" |
| 24 #include "sync/api/sync_change.h" | 24 #include "sync/api/sync_change.h" |
| 25 #include "sync/api/sync_data.h" | 25 #include "sync/api/sync_data.h" |
| 26 #include "sync/api/sync_error.h" | 26 #include "sync/api/sync_error.h" |
| 27 #include "sync/api/sync_error_factory.h" | 27 #include "sync/api/sync_error_factory.h" |
| 28 #include "sync/api/sync_merge_result.h" | 28 #include "sync/api/sync_merge_result.h" |
| 29 #include "sync/protocol/sync.pb.h" | 29 #include "sync/protocol/sync.pb.h" |
| 30 | 30 |
| 31 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
| 32 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" | 32 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 OnSupervisedUsersChanged()); | 571 OnSupervisedUsersChanged()); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void SupervisedUserSyncService::DispatchCallbacks() { | 574 void SupervisedUserSyncService::DispatchCallbacks() { |
| 575 const base::DictionaryValue* supervised_users = | 575 const base::DictionaryValue* supervised_users = |
| 576 prefs_->GetDictionary(prefs::kSupervisedUsers); | 576 prefs_->GetDictionary(prefs::kSupervisedUsers); |
| 577 for (const auto& callback : callbacks_) | 577 for (const auto& callback : callbacks_) |
| 578 callback.Run(supervised_users); | 578 callback.Run(supervised_users); |
| 579 callbacks_.clear(); | 579 callbacks_.clear(); |
| 580 } | 580 } |
| OLD | NEW |