| 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_pref_store.h" | 5 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/prefs/pref_value_map.h" | |
| 13 #include "base/values.h" | 12 #include "base/values.h" |
| 14 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
| 15 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 14 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 16 #include "chrome/browser/supervised_user/supervised_user_bookmarks_handler.h" | 15 #include "chrome/browser/supervised_user/supervised_user_bookmarks_handler.h" |
| 17 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 16 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
| 18 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 17 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 19 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 18 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
| 20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 22 #include "components/bookmarks/common/bookmark_pref_names.h" | 21 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 22 #include "components/prefs/pref_value_map.h" |
| 23 #include "components/signin/core/common/signin_pref_names.h" | 23 #include "components/signin/core/common/signin_pref_names.h" |
| 24 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 struct SupervisedUserSettingsPrefMappingEntry { | 28 struct SupervisedUserSettingsPrefMappingEntry { |
| 29 const char* settings_name; | 29 const char* settings_name; |
| 30 const char* pref_name; | 30 const char* pref_name; |
| 31 }; | 31 }; |
| 32 | 32 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 // Callback to unsubscribe from the supervised user settings service. | 170 // Callback to unsubscribe from the supervised user settings service. |
| 171 void SupervisedUserPrefStore::Observe( | 171 void SupervisedUserPrefStore::Observe( |
| 172 int type, | 172 int type, |
| 173 const content::NotificationSource& src, | 173 const content::NotificationSource& src, |
| 174 const content::NotificationDetails& details) { | 174 const content::NotificationDetails& details) { |
| 175 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); | 175 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
| 176 user_settings_subscription_.reset(); | 176 user_settings_subscription_.reset(); |
| 177 } | 177 } |
| OLD | NEW |