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

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

Issue 2457843002: MD Settings: Misc. Site Settings cleanups. (Closed)
Patch Set: fix Created 4 years, 1 month 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 <string> 10 #include <string>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const char* ui_name_key; 98 const char* ui_name_key;
99 }; 99 };
100 100
101 ChooserContextBase* GetUsbChooserContext(Profile* profile); 101 ChooserContextBase* GetUsbChooserContext(Profile* profile);
102 102
103 struct ContentSettingsTypeNameEntry { 103 struct ContentSettingsTypeNameEntry {
104 ContentSettingsType type; 104 ContentSettingsType type;
105 const char* name; 105 const char* name;
106 }; 106 };
107 107
108 const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
109 {CONTENT_SETTINGS_TYPE_COOKIES, "cookies"},
110 {CONTENT_SETTINGS_TYPE_IMAGES, "images"},
111 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"},
112 {CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"},
113 {CONTENT_SETTINGS_TYPE_POPUPS, "popups"},
114 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"},
115 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"},
116 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"},
117 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
118 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
119 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"},
120 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"},
121 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"},
122 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"},
123 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"},
124 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"},
125 {CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, "ssl-cert-decisions"},
126 #if defined(OS_CHROMEOS)
127 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"},
128 #endif
129 {CONTENT_SETTINGS_TYPE_KEYGEN, "keygen"},
130 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "background-sync"},
131 };
132
133 const ChooserTypeNameEntry kChooserTypeGroupNames[] = { 108 const ChooserTypeNameEntry kChooserTypeGroupNames[] = {
134 {CONTENT_SETTINGS_TYPE_USB_CHOOSER_DATA, &GetUsbChooserContext, 109 {CONTENT_SETTINGS_TYPE_USB_CHOOSER_DATA, &GetUsbChooserContext,
135 kGroupTypeUsb, "name"}, 110 kGroupTypeUsb, "name"},
136 }; 111 };
137 112
138 const ChooserTypeNameEntry* ChooserTypeFromGroupName(const std::string& name); 113 const ChooserTypeNameEntry* ChooserTypeFromGroupName(const std::string& name);
139 114
140 // Fills in |exceptions| with Values for the given |chooser_type| from map. 115 // Fills in |exceptions| with Values for the given |chooser_type| from map.
141 void GetChooserExceptionsFromProfile( 116 void GetChooserExceptionsFromProfile(
142 Profile* profile, 117 Profile* profile,
143 bool incognito, 118 bool incognito,
144 const ChooserTypeNameEntry& chooser_type, 119 const ChooserTypeNameEntry& chooser_type,
145 base::ListValue* exceptions); 120 base::ListValue* exceptions);
146 121
147 } // namespace site_settings 122 } // namespace site_settings
148 123
149 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_ 124 #endif // CHROME_BROWSER_UI_WEBUI_SITE_SETTINGS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698