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

Side by Side Diff: chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months 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/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
8 #include <set> 9 #include <set>
9 #include <utility> 10 #include <utility>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
15 #include "base/values.h" 16 #include "base/values.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 19 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
19 #include "chrome/browser/signin/signin_manager_factory.h" 20 #include "chrome/browser/signin/signin_manager_factory.h"
20 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
21 #include "components/pref_registry/pref_registry_syncable.h" 22 #include "components/pref_registry/pref_registry_syncable.h"
22 #include "components/prefs/scoped_user_pref_update.h" 23 #include "components/prefs/scoped_user_pref_update.h"
23 #include "components/signin/core/browser/signin_manager.h" 24 #include "components/signin/core/browser/signin_manager.h"
24 #include "sync/api/sync_change.h" 25 #include "components/sync/api/sync_change.h"
25 #include "sync/api/sync_data.h" 26 #include "components/sync/api/sync_data.h"
26 #include "sync/api/sync_error.h" 27 #include "components/sync/api/sync_error.h"
27 #include "sync/api/sync_error_factory.h" 28 #include "components/sync/api/sync_error_factory.h"
28 #include "sync/api/sync_merge_result.h" 29 #include "components/sync/api/sync_merge_result.h"
29 #include "sync/protocol/sync.pb.h" 30 #include "components/sync/protocol/sync.pb.h"
30 31
31 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
32 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im ages.h" 33 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im ages.h"
33 #endif 34 #endif
34 35
35 using base::DictionaryValue; 36 using base::DictionaryValue;
36 using user_prefs::PrefRegistrySyncable; 37 using user_prefs::PrefRegistrySyncable;
37 using syncer::SUPERVISED_USERS; 38 using syncer::SUPERVISED_USERS;
38 using syncer::ModelType; 39 using syncer::ModelType;
39 using syncer::SyncChange; 40 using syncer::SyncChange;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 OnSupervisedUsersChanged()); 572 OnSupervisedUsersChanged());
572 } 573 }
573 574
574 void SupervisedUserSyncService::DispatchCallbacks() { 575 void SupervisedUserSyncService::DispatchCallbacks() {
575 const base::DictionaryValue* supervised_users = 576 const base::DictionaryValue* supervised_users =
576 prefs_->GetDictionary(prefs::kSupervisedUsers); 577 prefs_->GetDictionary(prefs::kSupervisedUsers);
577 for (const auto& callback : callbacks_) 578 for (const auto& callback : callbacks_)
578 callback.Run(supervised_users); 579 callback.Run(supervised_users);
579 callbacks_.clear(); 580 callbacks_.clear();
580 } 581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698