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

Issue 1515033004: [MD Settings] Stop prefs singleton firing change events at initialization (Closed)

Created:
5 years ago by michaelpg
Modified:
5 years ago
Reviewers:
dschuyler, stevenjb
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD Settings] Stop prefs singleton firing change events at initialization settings-prefs-singleton relies on settings-prefs instances to see changes made by the UI. shared-prefs forwards these changes by observing "prefs.*" and firing a custom event including the change record. The custom event was named "prefs-changed", which is the same name as an event fired by Polymer when "this.prefs" is set. So, we were observing both "prefs.*" and "prefs" in one function, but those events have different arguments. Use a different name ("shared-prefs-changed") for this. The shared-prefs instances still need to listen to changes coming from the singleton, so we have settings-prefs-singleton manually fire the prefs-changed event when its prefs change. Committed: https://crrev.com/6547a5017257ded6d8a4dc04dc7a1879c41c2209 Cr-Commit-Position: refs/heads/master@{#364889}

Patch Set 1 #

Patch Set 2 : fire from singleton #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -13 lines) Patch
M chrome/browser/resources/settings/prefs/prefs.js View 1 4 chunks +16 lines, -13 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
michaelpg
PTAL. If you want to understand this better, I have a fiddle: https://jsfiddle.net/qww5ccym/2/ But probably ...
5 years ago (2015-12-12 00:17:17 UTC) #3
stevenjb
lgtm
5 years ago (2015-12-12 00:23:40 UTC) #4
dschuyler
lgtm
5 years ago (2015-12-12 00:37:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515033004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515033004/20001
5 years ago (2015-12-12 00:47:21 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) android_clang_dbg_recipe on ...
5 years ago (2015-12-12 02:53:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1515033004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1515033004/20001
5 years ago (2015-12-12 03:04:24 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-12 03:52:34 UTC) #13
commit-bot: I haz the power
5 years ago (2015-12-12 03:53:16 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6547a5017257ded6d8a4dc04dc7a1879c41c2209
Cr-Commit-Position: refs/heads/master@{#364889}

Powered by Google App Engine
This is Rietveld 408576698