OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_ANDROID_SETTINGS_PROVIDER_H_ | |
6 #define CHROME_BROWSER_NOTIFICATIONS_ANDROID_SETTINGS_PROVIDER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/macros.h" | |
11 #include "components/content_settings/core/browser/content_settings_observable_p rovider.h" | |
12 #include "components/content_settings/core/browser/content_settings_observer.h" | |
13 #include "components/content_settings/core/common/content_settings.h" | |
14 #include "components/content_settings/core/common/content_settings_types.h" | |
15 #include "components/keyed_service/core/keyed_service.h" | |
16 | |
17 namespace content_settings { | |
Peter Beverloo
2017/05/15 15:10:09
nit: only code that's part of the content_settings
awdf
2017/05/16 15:17:36
Done (I note every other content settings observab
| |
18 | |
19 // This class provides notification content settings from system notification | |
20 // channels on Android O+. | |
Peter Beverloo
2017/05/15 15:10:09
It would be good to document the priority order of
awdf
2017/05/16 15:17:35
Done.
| |
21 class AndroidSettingsProvider : public ObservableProvider { | |
Peter Beverloo
2017/05/15 15:10:09
I'd suggest calling this NotificationContentSettin
awdf
2017/05/16 15:17:36
Done. ..Although, what about 'NotificationChannels
Peter Beverloo
2017/05/16 16:15:33
Up to you.
| |
22 public: | |
23 AndroidSettingsProvider(); | |
24 ~AndroidSettingsProvider() override; | |
25 | |
26 // ProviderInterface methods: | |
27 std::unique_ptr<RuleIterator> GetRuleIterator( | |
28 ContentSettingsType content_type, | |
29 const ResourceIdentifier& resource_identifier, | |
30 bool incognito) const override; | |
31 | |
32 bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern, | |
33 const ContentSettingsPattern& secondary_pattern, | |
34 ContentSettingsType content_type, | |
35 const ResourceIdentifier& resource_identifier, | |
36 base::Value* value) override; | |
37 | |
38 void ClearAllContentSettingsRules(ContentSettingsType content_type) override; | |
39 | |
40 void ShutdownOnUIThread() override; | |
Peter Beverloo
2017/05/15 15:10:09
micro nit: I wouldn't put the empty lines between
awdf
2017/05/16 15:17:36
interesting, even if they're multiline? That would
Peter Beverloo
2017/05/16 16:15:33
Yeah, think of it as a "block" of implementations
| |
41 | |
42 private: | |
43 bool should_use_channels_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(AndroidSettingsProvider); | |
46 }; | |
47 | |
48 } // namespace content_settings | |
49 | |
50 #endif // CHROME_BROWSER_NOTIFICATIONS_ANDROID_SETTINGS_PROVIDER_H_ | |
OLD | NEW |