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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2760183002: [MD setting] separate RawSiteException and SiteException (Closed)
Patch Set: Created 3 years, 9 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 /** 5 /**
6 * @fileoverview A helper object used from the "Site Settings" section to 6 * @fileoverview A helper object used from the "Site Settings" section to
7 * interact with the content settings prefs. 7 * interact with the content settings prefs.
8 */ 8 */
9 9
10 /** 10 /**
11 * The handler will send a policy source that is similar, but not exactly the 11 * The handler will send a policy source that is similar, but not exactly the
12 * same as a ControlledBy value. If the ContentSettingProvider is omitted it 12 * same as a ControlledBy value. If the ContentSettingProvider is omitted it
13 * should be treated as 'default'. 13 * should be treated as 'default'.
14 * @enum {string} 14 * @enum {string}
15 */ 15 */
16 var ContentSettingProvider = { 16 var ContentSettingProvider = {
17 EXTENSION: 'extension', 17 EXTENSION: 'extension',
18 PREFERENCE: 'preference', 18 PREFERENCE: 'preference',
19 }; 19 };
20 20
21 /** 21 /**
22 * The site exception information passed form the C++ handler.
23 * See also: SiteException.
22 * @typedef {{embeddingOrigin: string, 24 * @typedef {{embeddingOrigin: string,
23 * embeddingDisplayName: string, 25 * embeddingDisplayName: string,
24 * incognito: boolean, 26 * incognito: boolean,
25 * origin: string, 27 * origin: string,
26 * displayName: string, 28 * displayName: string,
27 * setting: string, 29 * setting: string,
28 * source: string}} 30 * source: string}}
29 */ 31 */
32 var RawSiteException;
33
34 /**
35 * The site exception after it has been converted/filtered for UI use.
36 * See also: RawSiteException.
37 * @typedef {{category: string,
dpapad 2017/03/21 01:04:22 Follow up question from previous comment. 1) Shou
dschuyler 2017/03/22 01:35:41 It can be. Done.
38 * embeddingOrigin: string,
39 * embeddingDisplayName: string,
40 * incognito: boolean,
41 * origin: string,
42 * displayName: string,
43 * setting: string,
44 * source: string}}
45 */
30 var SiteException; 46 var SiteException;
31 47
32 /** 48 /**
33 * @typedef {{location: string, 49 * @typedef {{location: string,
34 * notifications: string}} 50 * notifications: string}}
35 */ 51 */
36 var CategoryDefaultsPref; 52 var CategoryDefaultsPref;
37 53
38 /** 54 /**
39 * @typedef {{setting: string, 55 * @typedef {{setting: string,
40 * source: ContentSettingProvider}} 56 * source: ContentSettingProvider}}
41 */ 57 */
42 var DefaultContentSetting; 58 var DefaultContentSetting;
43 59
44 /** 60 /**
45 * @typedef {{location: Array<SiteException>, 61 * @typedef {{location: Array<SiteException>,
dpapad 2017/03/21 01:04:22 What about these two?
dschuyler 2017/03/22 01:35:41 Are ya asking if these should be RawSiteExceptions
dpapad 2017/03/22 17:28:53 Ok. Yes, that is what I was asking.
46 * notifications: Array<SiteException>}} 62 * notifications: Array<SiteException>}}
47 */ 63 */
48 var ExceptionListPref; 64 var ExceptionListPref;
49 65
50 /** 66 /**
51 * @typedef {{defaults: CategoryDefaultsPref, 67 * @typedef {{defaults: CategoryDefaultsPref,
52 * exceptions: ExceptionListPref}} 68 * exceptions: ExceptionListPref}}
53 */ 69 */
54 var SiteSettingsPref; 70 var SiteSettingsPref;
55 71
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 /** 129 /**
114 * Gets the default value for a site settings category. 130 * Gets the default value for a site settings category.
115 * @param {string} contentType The name of the category to query. 131 * @param {string} contentType The name of the category to query.
116 * @return {!Promise<!DefaultContentSetting>} 132 * @return {!Promise<!DefaultContentSetting>}
117 */ 133 */
118 getDefaultValueForContentType: function(contentType) {}, 134 getDefaultValueForContentType: function(contentType) {},
119 135
120 /** 136 /**
121 * Gets the exceptions (site list) for a particular category. 137 * Gets the exceptions (site list) for a particular category.
122 * @param {string} contentType The name of the category to query. 138 * @param {string} contentType The name of the category to query.
123 * @return {!Promise<!Array<!SiteException>>} 139 * @return {!Promise<!Array<!RawSiteException>>}
124 */ 140 */
125 getExceptionList: function(contentType) {}, 141 getExceptionList: function(contentType) {},
126 142
127 /** 143 /**
128 * Gets the exception details for a particular site. 144 * Gets the exception details for a particular site.
129 * @param {string} site The name of the site. 145 * @param {string} site The name of the site.
130 * @return {!Promise<!SiteException>} 146 * @return {!Promise<!RawSiteException>}
131 */ 147 */
132 getSiteDetails: function(site) {}, 148 getSiteDetails: function(site) {},
133 149
134 /** 150 /**
135 * Resets the category permission for a given origin (expressed as primary 151 * Resets the category permission for a given origin (expressed as primary
136 * and secondary patterns). 152 * and secondary patterns).
137 * @param {string} primaryPattern The origin to change (primary pattern). 153 * @param {string} primaryPattern The origin to change (primary pattern).
138 * @param {string} secondaryPattern The embedding origin to change 154 * @param {string} secondaryPattern The embedding origin to change
139 * (secondary pattern). 155 * (secondary pattern).
140 * @param {string} contentType The name of the category to reset. 156 * @param {string} contentType The name of the category to reset.
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 removeZoomLevel: function(host) { 432 removeZoomLevel: function(host) {
417 chrome.send('removeZoomLevel', [host]); 433 chrome.send('removeZoomLevel', [host]);
418 }, 434 },
419 }; 435 };
420 436
421 return { 437 return {
422 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, 438 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
423 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, 439 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl,
424 }; 440 };
425 }); 441 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698