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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_whitelist_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/supervised_user_whitelist_service.h" 5 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/metrics/user_metrics.h" 14 #include "base/metrics/user_metrics.h"
15 #include "base/metrics/user_metrics_action.h" 15 #include "base/metrics/user_metrics_action.h"
16 #include "base/strings/string_split.h" 16 #include "base/strings/string_split.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " 18 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
19 #include "chrome/browser/supervised_user/supervised_user_site_list.h" 19 #include "chrome/browser/supervised_user/supervised_user_site_list.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
22 #include "components/pref_registry/pref_registry_syncable.h" 22 #include "components/pref_registry/pref_registry_syncable.h"
23 #include "components/prefs/pref_service.h" 23 #include "components/prefs/pref_service.h"
24 #include "components/prefs/scoped_user_pref_update.h" 24 #include "components/prefs/scoped_user_pref_update.h"
25 #include "sync/api/sync_change.h" 25 #include "components/sync/api/sync_change.h"
26 #include "sync/api/sync_data.h" 26 #include "components/sync/api/sync_data.h"
27 #include "sync/api/sync_error.h" 27 #include "components/sync/api/sync_error.h"
28 #include "sync/api/sync_error_factory.h" 28 #include "components/sync/api/sync_error_factory.h"
29 #include "sync/api/sync_merge_result.h" 29 #include "components/sync/api/sync_merge_result.h"
30 #include "sync/protocol/sync.pb.h" 30 #include "components/sync/protocol/sync.pb.h"
31 31
32 const char kName[] = "name"; 32 const char kName[] = "name";
33 33
34 SupervisedUserWhitelistService::SupervisedUserWhitelistService( 34 SupervisedUserWhitelistService::SupervisedUserWhitelistService(
35 PrefService* prefs, 35 PrefService* prefs,
36 component_updater::SupervisedUserWhitelistInstaller* installer, 36 component_updater::SupervisedUserWhitelistInstaller* installer,
37 const std::string& client_id) 37 const std::string& client_id)
38 : prefs_(prefs), 38 : prefs_(prefs),
39 installer_(installer), 39 installer_(installer),
40 client_id_(client_id), 40 client_id_(client_id),
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 UMA_HISTOGRAM_TIMES("ManagedUsers.Whitelist.TotalLoadDuration", 357 UMA_HISTOGRAM_TIMES("ManagedUsers.Whitelist.TotalLoadDuration",
358 base::TimeTicks::Now() - start_time); 358 base::TimeTicks::Now() - start_time);
359 359
360 // If the whitelist has been unregistered in the mean time, ignore it. 360 // If the whitelist has been unregistered in the mean time, ignore it.
361 if (registered_whitelists_.count(id) == 0u) 361 if (registered_whitelists_.count(id) == 0u)
362 return; 362 return;
363 363
364 loaded_whitelists_[id] = whitelist; 364 loaded_whitelists_[id] = whitelist;
365 NotifyWhitelistsChanged(); 365 NotifyWhitelistsChanged();
366 } 366 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698