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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/prefs/pref_service.h"
17 #include "base/prefs/scoped_user_pref_update.h"
18 #include "base/strings/string_split.h" 16 #include "base/strings/string_split.h"
19 #include "base/values.h" 17 #include "base/values.h"
20 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " 18 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
21 #include "chrome/browser/supervised_user/supervised_user_site_list.h" 19 #include "chrome/browser/supervised_user/supervised_user_site_list.h"
22 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
24 #include "components/pref_registry/pref_registry_syncable.h" 22 #include "components/pref_registry/pref_registry_syncable.h"
23 #include "components/prefs/pref_service.h"
24 #include "components/prefs/scoped_user_pref_update.h"
25 #include "sync/api/sync_change.h" 25 #include "sync/api/sync_change.h"
26 #include "sync/api/sync_data.h" 26 #include "sync/api/sync_data.h"
27 #include "sync/api/sync_error.h" 27 #include "sync/api/sync_error.h"
28 #include "sync/api/sync_error_factory.h" 28 #include "sync/api/sync_error_factory.h"
29 #include "sync/api/sync_merge_result.h" 29 #include "sync/api/sync_merge_result.h"
30 #include "sync/protocol/sync.pb.h" 30 #include "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(
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 UMA_HISTOGRAM_TIMES("ManagedUsers.Whitelist.TotalLoadDuration", 356 UMA_HISTOGRAM_TIMES("ManagedUsers.Whitelist.TotalLoadDuration",
357 base::TimeTicks::Now() - start_time); 357 base::TimeTicks::Now() - start_time);
358 358
359 // If the whitelist has been unregistered in the mean time, ignore it. 359 // If the whitelist has been unregistered in the mean time, ignore it.
360 if (registered_whitelists_.count(id) == 0u) 360 if (registered_whitelists_.count(id) == 0u)
361 return; 361 return;
362 362
363 loaded_whitelists_[id] = whitelist; 363 loaded_whitelists_[id] = whitelist;
364 NotifyWhitelistsChanged(); 364 NotifyWhitelistsChanged();
365 } 365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698