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

Unified Diff: chrome/browser/resources/settings/site_settings/prefs_private_api.js

Issue 1698093007: Convert SiteSettingsCategory to use the HostContentSettingsMap instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/prefs_private_api.js
diff --git a/chrome/browser/resources/settings/site_settings/prefs_private_api.js b/chrome/browser/resources/settings/site_settings/prefs_private_api.js
new file mode 100644
index 0000000000000000000000000000000000000000..e02b2358968e301d3cbc942e88190a4555f142cb
--- /dev/null
+++ b/chrome/browser/resources/settings/site_settings/prefs_private_api.js
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+'use strict';
+
+Polymer({
+ is: 'prefs-private-api',
+
+ /**
+ * Sets the default value for a site settings category.
+ * @param {number} contentType The category to change.
+ * @param {number} defaultValue The value to set as default.
+ */
+ setDefaultValueForContentType: function(contentType, defaultValue) {
+ chrome.send('setDefaultValueForContentType', [contentType, defaultValue]);
+ },
+
+ /**
+ * Gets the default value for a site settings category.
+ * @param {number} contentType The category to change.
+ * @return {Promise}
+ */
+ getDefaultValueForContentType: function(contentType) {
+ return cr.sendWithPromise('getDefaultValueForContentType', contentType);
+ },
+});
+})();
Finnur 2016/02/16 15:41:04 At first, I had a corresponding cr singleton objec
tommycli 2016/02/17 18:18:06 After a long discussion with dpapad, we agreed tha
Finnur 2016/02/18 20:38:17 Done. I'm fine with that, as long as this doesn't

Powered by Google App Engine
This is Rietveld 408576698