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

Side by Side Diff: chrome/browser/ui/webui/site_settings_helper.h

Issue 2048633002: Site Settings Desktop: Fix NOTREACHED when group name is unregistered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 21 matching lines...) Expand all
32 OnePatternSettings> 32 OnePatternSettings>
33 AllPatternsSettings; 33 AllPatternsSettings;
34 34
35 extern const char kSetting[]; 35 extern const char kSetting[];
36 extern const char kOrigin[]; 36 extern const char kOrigin[];
37 extern const char kPolicyProviderId[]; 37 extern const char kPolicyProviderId[];
38 extern const char kSource[]; 38 extern const char kSource[];
39 extern const char kEmbeddingOrigin[]; 39 extern const char kEmbeddingOrigin[];
40 extern const char kPreferencesSource[]; 40 extern const char kPreferencesSource[];
41 41
42 // Returns whether a group name has been registered for the given type.
43 bool HasRegisteredGroupName(ContentSettingsType type);
44
42 // Gets a content settings type from the group name identifier. 45 // Gets a content settings type from the group name identifier.
43 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name); 46 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name);
44 47
45 // Gets a string identifier for the group name. 48 // Gets a string identifier for the group name.
46 std::string ContentSettingsTypeToGroupName(ContentSettingsType type); 49 std::string ContentSettingsTypeToGroupName(ContentSettingsType type);
47 50
48 // Fills in |exceptions| with Values for the given |type| from |map|. 51 // Fills in |exceptions| with Values for the given |type| from |map|.
49 void GetExceptionsFromHostContentSettingsMap( 52 void GetExceptionsFromHostContentSettingsMap(
50 const HostContentSettingsMap* map, 53 const HostContentSettingsMap* map,
51 ContentSettingsType type, 54 ContentSettingsType type,
52 content::WebUI* web_ui, 55 content::WebUI* web_ui,
53 base::ListValue* exceptions); 56 base::ListValue* exceptions);
54 57
55 // Returns exceptions constructed from the policy-set allowed URLs 58 // Returns exceptions constructed from the policy-set allowed URLs
56 // for the content settings |type| mic or camera. 59 // for the content settings |type| mic or camera.
57 void GetPolicyAllowedUrls( 60 void GetPolicyAllowedUrls(
58 ContentSettingsType type, 61 ContentSettingsType type,
59 std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions, 62 std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions,
60 content::WebUI* web_ui); 63 content::WebUI* web_ui);
61 64
62 } // namespace site_settings 65 } // namespace site_settings
63 66
64 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ 67 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/site_settings_handler.cc ('k') | chrome/browser/ui/webui/site_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698