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

Unified Diff: chrome/browser/resources/settings/search_page/search_page.js

Issue 2835933007: MD Settings: show when the default search engine is controlled by policy (Closed)
Patch Set: fix typo, dpapad@ review Created 3 years, 8 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/search_page/search_page.js
diff --git a/chrome/browser/resources/settings/search_page/search_page.js b/chrome/browser/resources/settings/search_page/search_page.js
index 41db7cbf67cb6b988242a4a42f08bd695c3e27ec..78e8febc264a5b873e1dd325cc76c0a4edba3599 100644
--- a/chrome/browser/resources/settings/search_page/search_page.js
+++ b/chrome/browser/resources/settings/search_page/search_page.js
@@ -172,5 +172,23 @@ Polymer({
*/
doNothing_: function(event) {
event.stopPropagation();
- }
+ },
+
+ /**
+ * @param {!chrome.settingsPrivate.PrefObject} pref
+ * @return {boolean}
+ * @private
+ */
+ isDefaultSearchControlledByPolicy_: function(pref) {
+ return pref.controlledBy == chrome.settingsPrivate.ControlledBy.USER_POLICY;
+ },
+
+ /**
+ * @param {!chrome.settingsPrivate.PrefObject} pref
+ * @return {boolean}
+ * @private
+ */
+ isDefaultSearchEngineEnforced_: function(pref) {
+ return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED;
+ },
});
« no previous file with comments | « chrome/browser/resources/settings/search_page/search_page.html ('k') | chrome/test/data/webui/settings/search_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698