OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/content_settings/host_content_settings_map_factory.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
10 #include "chrome/browser/notifications/notification_content_settings_provider_an droid.h" | |
10 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 11 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
11 #include "chrome/browser/profiles/off_the_record_profile_impl.h" | 12 #include "chrome/browser/profiles/off_the_record_profile_impl.h" |
12 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/common/chrome_features.h" | 14 #include "chrome/common/chrome_features.h" |
14 #include "components/content_settings/core/browser/host_content_settings_map.h" | 15 #include "components/content_settings/core/browser/host_content_settings_map.h" |
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 16 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
16 #include "components/sync_preferences/pref_service_syncable.h" | 17 #include "components/sync_preferences/pref_service_syncable.h" |
17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
18 #include "extensions/features/features.h" | 19 #include "extensions/features/features.h" |
19 | 20 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 SupervisedUserSettingsServiceFactory::GetForProfile(profile); | 103 SupervisedUserSettingsServiceFactory::GetForProfile(profile); |
103 // This may be null in testing. | 104 // This may be null in testing. |
104 if (supervised_service) { | 105 if (supervised_service) { |
105 std::unique_ptr<content_settings::SupervisedProvider> supervised_provider( | 106 std::unique_ptr<content_settings::SupervisedProvider> supervised_provider( |
106 new content_settings::SupervisedProvider(supervised_service)); | 107 new content_settings::SupervisedProvider(supervised_service)); |
107 settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER, | 108 settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER, |
108 std::move(supervised_provider)); | 109 std::move(supervised_provider)); |
109 } | 110 } |
110 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) | 111 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) |
111 | 112 |
113 #if defined(OS_ANDROID) | |
Peter Beverloo
2017/05/16 16:15:34
Should we also guard the implementation behind a b
raymes
2017/05/17 03:13:38
+1 good idea :)
awdf
2017/05/17 17:14:40
Done.
| |
114 auto android_system_provider = | |
Peter Beverloo
2017/05/16 16:15:34
micro nit: rename
awdf
2017/05/17 17:14:40
Done.
| |
115 base::MakeUnique<NotificationContentSettingsProviderAndroid>(); | |
116 settings_map->RegisterProvider( | |
117 HostContentSettingsMap::NOTIFICATION_CONTENT_SETTINGS_ANDROID_PROVIDER, | |
118 std::move(android_system_provider)); | |
119 #endif | |
112 return settings_map; | 120 return settings_map; |
113 } | 121 } |
114 | 122 |
115 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse( | 123 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse( |
116 content::BrowserContext* context) const { | 124 content::BrowserContext* context) const { |
117 return context; | 125 return context; |
118 } | 126 } |
OLD | NEW |