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

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

Issue 2851393003: MD Settings: show when the default search engine is controlled by policy (Closed)
Patch Set: 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 a307f3da2265a49dc126df62593ec9e6732dd68f..f817fb4d6c743d0831120e33cc8db007121a4290 100644
--- a/chrome/browser/resources/settings/search_page/search_page.js
+++ b/chrome/browser/resources/settings/search_page/search_page.js
@@ -177,5 +177,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