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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 7342009: Show a different banner in chrome://settings for extension-controlled settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 5 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/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 26b395d2bcb16c7f860d73e08bc3fa459078b98c..9a043143cc7d1fcc8cd3d17c6ddec8272421ef3a 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -222,7 +222,7 @@ cr.define('options', function() {
*/
shouldEnableCustomStartupPageControls: function(pages) {
return $('startupShowPagesButton').checked &&
- !this.startup_pages_pref_.managed;
+ !this.startup_pages_pref_.controlledBy;
},
/**
@@ -275,9 +275,10 @@ cr.define('options', function() {
*/
handleHomepageChange_: function(event) {
this.homepage_pref_.value = event.value['value'];
- this.homepage_pref_.managed = event.value['managed'];
- if (this.isHomepageURLNewTabPageURL_() && !this.homepage_pref_.managed &&
- !this.homepage_is_newtabpage_pref_.managed) {
+ this.homepage_pref_.controlledBy = event.value['controlledBy'];
+ if (this.isHomepageURLNewTabPageURL_() &&
+ !this.homepage_pref_.controlledBy &&
+ !this.homepage_is_newtabpage_pref_.controlledBy) {
var useNewTabPage = this.isHomepageIsNewTabPageChoiceSelected_();
Preferences.setStringPref(this.homepage_pref_.name, '')
Preferences.setBooleanPref(this.homepage_is_newtabpage_pref_.name,
@@ -293,7 +294,8 @@ cr.define('options', function() {
*/
handleHomepageIsNewTabPageChange_: function(event) {
this.homepage_is_newtabpage_pref_.value = event.value['value'];
- this.homepage_is_newtabpage_pref_.managed = event.value['managed'];
+ this.homepage_is_newtabpage_pref_.controlledBy =
+ event.value['controlledBy'];
this.updateHomepageControlStates_();
},
@@ -368,8 +370,8 @@ cr.define('options', function() {
isHomepageIsNewTabPageChoiceSelected_: function() {
return (this.homepage_is_newtabpage_pref_.value ||
(this.isHomepageURLNewTabPageURL_() &&
- (this.homepage_pref_.managed ||
- !this.homepage_is_newtabpage_pref_.managed)));
+ (this.homepage_pref_.controlledBy ||
+ !this.homepage_is_newtabpage_pref_.controlledBy)));
},
/**
@@ -378,8 +380,8 @@ cr.define('options', function() {
* @private
*/
isHomepageChoiceEnabled_: function() {
- return (!this.homepage_is_newtabpage_pref_.managed &&
- !(this.homepage_pref_.managed &&
+ return (!this.homepage_is_newtabpage_pref_.controlledBy &&
+ !(this.homepage_pref_.controlledBy &&
this.isHomepageURLNewTabPageURL_()));
},
@@ -390,9 +392,9 @@ cr.define('options', function() {
*/
isHomepageURLFieldEnabled_: function() {
return (!this.homepage_is_newtabpage_pref_.value &&
- !this.homepage_pref_.managed &&
+ !this.homepage_pref_.controlledBy &&
!(this.isHomepageURLNewTabPageURL_() &&
- !this.homepage_is_newtabpage_pref_.managed));
+ !this.homepage_is_newtabpage_pref_.controlledBy));
},
/**
@@ -418,7 +420,7 @@ cr.define('options', function() {
* @private
*/
handleStartupPageListChange_: function(event) {
- this.startup_pages_pref_.managed = event.value['managed'];
+ this.startup_pages_pref_.controlledBy = event.value['controlledBy'];
this.updateCustomStartupPageControlStates_();
},
« no previous file with comments | « chrome/browser/policy/managed_prefs_banner_base_unittest.cc ('k') | chrome/browser/resources/options/content_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698