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

Side by Side Diff: chrome/browser/resources/options2/options_page.js

Issue 10542023: Disable modifying extensions when in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Added missing CSS file Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 ///////////////////////////////////////////////////////////////////////////// 6 /////////////////////////////////////////////////////////////////////////////
7 // OptionsPage class: 7 // OptionsPage class:
8 8
9 /** 9 /**
10 * Base class for options page. 10 * Base class for options page.
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 controlledByPolicy = true; 701 controlledByPolicy = true;
702 else if (inputElements[i].controlledBy == 'extension') 702 else if (inputElements[i].controlledBy == 'extension')
703 controlledByExtension = true; 703 controlledByExtension = true;
704 } 704 }
705 705
706 if (!controlledByPolicy && !controlledByExtension) { 706 if (!controlledByPolicy && !controlledByExtension) {
707 this.pageDiv.classList.remove('showing-banner'); 707 this.pageDiv.classList.remove('showing-banner');
708 } else { 708 } else {
709 this.pageDiv.classList.add('showing-banner'); 709 this.pageDiv.classList.add('showing-banner');
710 710
711 var text = bannerDiv.querySelector('.managed-prefs-text'); 711 var text = bannerDiv.querySelector('#managed-prefs-text');
712 if (controlledByPolicy && !controlledByExtension) { 712 if (controlledByPolicy && !controlledByExtension) {
713 text.textContent = 713 text.textContent =
714 loadTimeData.getString('policyManagedPrefsBannerText'); 714 loadTimeData.getString('policyManagedPrefsBannerText');
715 } else if (!controlledByPolicy && controlledByExtension) { 715 } else if (!controlledByPolicy && controlledByExtension) {
716 text.textContent = 716 text.textContent =
717 loadTimeData.getString('extensionManagedPrefsBannerText'); 717 loadTimeData.getString('extensionManagedPrefsBannerText');
718 } else if (controlledByPolicy && controlledByExtension) { 718 } else if (controlledByPolicy && controlledByExtension) {
719 text.textContent = loadTimeData.getString( 719 text.textContent = loadTimeData.getString(
720 'policyAndExtensionManagedPrefsBannerText'); 720 'policyAndExtensionManagedPrefsBannerText');
721 } 721 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 canShowPage: function() { 897 canShowPage: function() {
898 return true; 898 return true;
899 }, 899 },
900 }; 900 };
901 901
902 // Export 902 // Export
903 return { 903 return {
904 OptionsPage: OptionsPage 904 OptionsPage: OptionsPage
905 }; 905 };
906 }); 906 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698