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/supervised_user_settings_service.h" | 5 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
17 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 17 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
19 #include "components/prefs/json_pref_store.h" | 19 #include "components/prefs/json_pref_store.h" |
20 #include "components/prefs/pref_filter.h" | 20 #include "components/prefs/pref_filter.h" |
| 21 #include "components/sync/api/sync_change.h" |
| 22 #include "components/sync/api/sync_error_factory.h" |
| 23 #include "components/sync/protocol/sync.pb.h" |
21 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/user_metrics.h" | 25 #include "content/public/browser/user_metrics.h" |
23 #include "sync/api/sync_change.h" | |
24 #include "sync/api/sync_error_factory.h" | |
25 #include "sync/protocol/sync.pb.h" | |
26 | 26 |
27 using base::DictionaryValue; | 27 using base::DictionaryValue; |
28 using base::JSONReader; | 28 using base::JSONReader; |
29 using base::UserMetricsAction; | 29 using base::UserMetricsAction; |
30 using base::Value; | 30 using base::Value; |
31 using content::BrowserThread; | 31 using content::BrowserThread; |
32 using syncer::SUPERVISED_USER_SETTINGS; | 32 using syncer::SUPERVISED_USER_SETTINGS; |
33 using syncer::ModelType; | 33 using syncer::ModelType; |
34 using syncer::SyncChange; | 34 using syncer::SyncChange; |
35 using syncer::SyncChangeList; | 35 using syncer::SyncChangeList; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 return settings; | 481 return settings; |
482 } | 482 } |
483 | 483 |
484 void SupervisedUserSettingsService::InformSubscribers() { | 484 void SupervisedUserSettingsService::InformSubscribers() { |
485 if (!IsReady()) | 485 if (!IsReady()) |
486 return; | 486 return; |
487 | 487 |
488 std::unique_ptr<base::DictionaryValue> settings = GetSettings(); | 488 std::unique_ptr<base::DictionaryValue> settings = GetSettings(); |
489 callback_list_.Notify(settings.get()); | 489 callback_list_.Notify(settings.get()); |
490 } | 490 } |
OLD | NEW |