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

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

Issue 2506323002: MD Settings: show an extension-controlled-indicator for proxy (Closed)
Patch Set: -@private Created 4 years, 1 month 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 | chrome/browser/resources/settings/settings_ui/compiled_resources2.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/prefs/prefs.js
diff --git a/chrome/browser/resources/settings/prefs/prefs.js b/chrome/browser/resources/settings/prefs/prefs.js
index dd09816eb61c09cdf79df585f6e54f14fbb56ef2..446c222964e20b9cc038cf069b0420a0042a7235 100644
--- a/chrome/browser/resources/settings/prefs/prefs.js
+++ b/chrome/browser/resources/settings/prefs/prefs.js
@@ -227,11 +227,16 @@
* @private
*/
setPrefCallback_: function(key, success) {
- if (success)
- return;
+ if (!success)
+ this.refresh(key);
+ },
- // Get the current pref value from chrome.settingsPrivate to ensure the
- // UI stays up to date.
+ /**
+ * Get the current pref value from chrome.settingsPrivate to ensure the UI
+ * stays up to date.
+ * @param {string} key
+ */
+ refresh: function(key) {
this.settingsApi_.getPref(key, function(pref) {
this.updatePrefs_([pref]);
}.bind(this));
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_ui/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698