| 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/prefs/pref_service_syncable_util.h" |   10 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|   23 #include "extensions/browser/extension_system_provider.h" |   23 #include "extensions/browser/extension_system_provider.h" | 
|   24 #include "extensions/browser/extensions_browser_client.h" |   24 #include "extensions/browser/extensions_browser_client.h" | 
|   25 #endif |   25 #endif | 
|   26  |   26  | 
|   27 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |   27 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 
|   28 #include "chrome/browser/content_settings/content_settings_supervised_provider.h
     " |   28 #include "chrome/browser/content_settings/content_settings_supervised_provider.h
     " | 
|   29 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |   29 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 
|   30 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
     y.h" |   30 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
     y.h" | 
|   31 #endif |   31 #endif | 
|   32  |   32  | 
 |   33 #if defined(OS_ANDROID) | 
 |   34 #include "chrome/browser/notifications/notification_channels_provider_android.h" | 
 |   35 #endif  // OS_ANDROID | 
 |   36  | 
|   33 HostContentSettingsMapFactory::HostContentSettingsMapFactory() |   37 HostContentSettingsMapFactory::HostContentSettingsMapFactory() | 
|   34     : RefcountedBrowserContextKeyedServiceFactory( |   38     : RefcountedBrowserContextKeyedServiceFactory( | 
|   35         "HostContentSettingsMap", |   39         "HostContentSettingsMap", | 
|   36         BrowserContextDependencyManager::GetInstance()) { |   40         BrowserContextDependencyManager::GetInstance()) { | 
|   37 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |   41 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 
|   38   DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); |   42   DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); | 
|   39 #endif |   43 #endif | 
|   40 #if BUILDFLAG(ENABLE_EXTENSIONS) |   44 #if BUILDFLAG(ENABLE_EXTENSIONS) | 
|   41   DependsOn( |   45   DependsOn( | 
|   42       extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |   46       extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  102       SupervisedUserSettingsServiceFactory::GetForProfile(profile); |  106       SupervisedUserSettingsServiceFactory::GetForProfile(profile); | 
|  103   // This may be null in testing. |  107   // This may be null in testing. | 
|  104   if (supervised_service) { |  108   if (supervised_service) { | 
|  105     std::unique_ptr<content_settings::SupervisedProvider> supervised_provider( |  109     std::unique_ptr<content_settings::SupervisedProvider> supervised_provider( | 
|  106         new content_settings::SupervisedProvider(supervised_service)); |  110         new content_settings::SupervisedProvider(supervised_service)); | 
|  107     settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER, |  111     settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER, | 
|  108                                    std::move(supervised_provider)); |  112                                    std::move(supervised_provider)); | 
|  109   } |  113   } | 
|  110 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) |  114 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) | 
|  111  |  115  | 
 |  116 #if defined(OS_ANDROID) | 
 |  117   if (base::FeatureList::IsEnabled(features::kSiteNotificationChannels)) { | 
 |  118     auto channels_provider = | 
 |  119         base::MakeUnique<NotificationChannelsProviderAndroid>(); | 
 |  120     settings_map->RegisterProvider( | 
 |  121         HostContentSettingsMap::NOTIFICATION_ANDROID_PROVIDER, | 
 |  122         std::move(channels_provider)); | 
 |  123   } | 
 |  124 #endif  // defined (OS_ANDROID) | 
|  112   return settings_map; |  125   return settings_map; | 
|  113 } |  126 } | 
|  114  |  127  | 
|  115 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse( |  128 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse( | 
|  116     content::BrowserContext* context) const { |  129     content::BrowserContext* context) const { | 
|  117   return context; |  130   return context; | 
|  118 } |  131 } | 
| OLD | NEW |