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

Unified Diff: chrome/browser/resources/settings/on_startup_page/startup_urls_page.js

Issue 2953343002: MD Settings: Allow editing startup URLs when "recommended" policy is present. (Closed)
Patch Set: FIx compilation. Created 3 years, 6 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/on_startup_page/startup_urls_page.js
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
index fbc43d3eb5c3a5486e57aa988f55c7bfff3b5343..38451bedae6cf07a6aa5b1c781b4f5cabe29eed2 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page.js
@@ -86,4 +86,14 @@ Polymer({
onUseCurrentPagesTap_: function() {
this.browserProxy_.useCurrentPages();
},
+
+ /**
+ * @return {boolean} Whether "Add new page" and "Use current pages" are
+ * allowed.
+ * @private
+ */
+ shouldAllowUrlsEdit_: function() {
+ return this.get('prefs.session.startup_urls.enforcement') !=
+ chrome.settingsPrivate.Enforcement.ENFORCED;
+ },
});

Powered by Google App Engine
This is Rietveld 408576698