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

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map_factory.cc

Issue 2886433002: [Android] Adding content settings provider for notification channels (Closed)
Patch Set: update filenames elsewhere Created 3 years, 7 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 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/android_settings_provider.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 SupervisedUserSettingsServiceFactory::GetForProfile(profile); 106 SupervisedUserSettingsServiceFactory::GetForProfile(profile);
106 // This may be null in testing. 107 // This may be null in testing.
107 if (supervised_service) { 108 if (supervised_service) {
108 std::unique_ptr<content_settings::SupervisedProvider> supervised_provider( 109 std::unique_ptr<content_settings::SupervisedProvider> supervised_provider(
109 new content_settings::SupervisedProvider(supervised_service)); 110 new content_settings::SupervisedProvider(supervised_service));
110 settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER, 111 settings_map->RegisterProvider(HostContentSettingsMap::SUPERVISED_PROVIDER,
111 std::move(supervised_provider)); 112 std::move(supervised_provider));
112 } 113 }
113 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) 114 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
114 115
116 #if defined(OS_ANDROID)
117 auto android_system_provider =
118 base::MakeUnique<content_settings::AndroidSettingsProvider>();
119 settings_map->RegisterProvider(
120 HostContentSettingsMap::ANDROID_SETTINGS_PROVIDER,
121 std::move(android_system_provider));
122 #endif
115 return settings_map; 123 return settings_map;
116 } 124 }
117 125
118 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse( 126 content::BrowserContext* HostContentSettingsMapFactory::GetBrowserContextToUse(
119 content::BrowserContext* context) const { 127 content::BrowserContext* context) const {
120 return context; 128 return context;
121 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698