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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_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: Sync'ed 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 SiteSettingsPrefsProxy() {};
tommycli 2016/02/18 22:15:19 SiteSettingsPrefsBrowserProxy. I think the pattern
Finnur 2016/02/19 10:18:13 Done.
13
14 // TODOf figure out test.
tommycli 2016/02/18 22:15:18 nit: typo?
Finnur 2016/02/19 10:18:13 No, these are private messages for me. In this cas
15 // The singleton instance_ is replaced with a test version of this wrapper
16 // during testing.
17 cr.addSingletonGetter(SiteSettingsPrefsProxy);
18
19 SiteSettingsPrefsProxy.prototype = {
20 /**
21 * Sets the default value for a site settings category.
22 * @param {number} contentType The category to change.
23 * @param {number} defaultValue The value to set as default.
24 */
25 setDefaultValueForContentType: function(contentType, defaultValue) {
26 chrome.send('setDefaultValueForContentType', [contentType, defaultValue]);
27 },
28
29 /**
30 * Gets the default value for a site settings category.
31 * @param {number} contentType The category to change.
32 * @return {Promise}
33 */
34 getDefaultValueForContentType: function(contentType) {
35 return cr.sendWithPromise('getDefaultValueForContentType', contentType);
36 },
37 };
38
39 return {
40 SiteSettingsPrefsProxy: SiteSettingsPrefsProxy,
41 };
42 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698