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

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

Issue 1698093007: Convert SiteSettingsCategory to use the HostContentSettingsMap instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview A helper object used from the "Site Settings" section to
7 * interact with the content settings prefs.
8 */
9
10 cr.define('settings', function() {
11 /** @constructor */
12 function SiteSettingsPrefsBrowserProxy() {};
13
14 // The singleton instance_ is replaced with a test version of this wrapper
15 // during testing.
16 cr.addSingletonGetter(SiteSettingsPrefsBrowserProxy);
17
18 SiteSettingsPrefsBrowserProxy.prototype = {
19 /**
20 * Sets the default value for a site settings category.
21 * @param {number} contentType The category to change.
22 * @param {number} defaultValue The value to set as default.
23 */
24 setDefaultValueForContentType: function(contentType, defaultValue) {
25 chrome.send('setDefaultValueForContentType', [contentType, defaultValue]);
26 },
27
28 /**
29 * Gets the default value for a site settings category.
30 * @param {number} contentType The category to change.
31 * @return {Promise}
32 */
33 getDefaultValueForContentType: function(contentType) {
34 return cr.sendWithPromise('getDefaultValueForContentType', contentType);
35 },
36 };
37
38 return {
39 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
40 };
41 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698