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

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

Issue 2100803004: Options: Fix android app settings visibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1885f6e685eeb41112f96c126a2d638809e79099..8d9e03201e7d90e43e45cd639635b275d7dce052 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -832,12 +832,14 @@ cr.define('options', function() {
if (cr.isChromeOS) {
$('android-apps-settings-label').innerHTML =
loadTimeData.getString('androidAppsSettingsLabel');
- $('android-apps-enabled').addEventListener('change', function(e) {
+ Preferences.getInstance().addEventListener('arc.enabled', function(e) {
var settings = $('android-apps-settings');
- if (!settings)
+ // Only change settings visibility on committed settings changes.
+ if (!settings || e.value.uncommitted)
return;
- settings.hidden = !$('android-apps-enabled').checked;
+ settings.hidden = !e.value.value;
});
+
$('android-apps-settings-link').addEventListener('click', function(e) {
chrome.send('showAndroidAppsSettings');
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698