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

Issue 2742663002: MD Settings: defer sending pref updates until all synchronous operations finish (Closed)

Created:
3 years, 9 months ago by Dan Beam
Modified:
3 years, 9 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, scottchen
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: defer sending pref updates until all synchronous operations finish In the case of extension-controlled prefs, extensions like fillr use chrome.privacy.services.autofillEnabled.set({value: false}); To disable Chrome's native Autofill. When this happens, code runs[1] in chrome to set a pref in the: 1) profile pref store 2) extensions pref store We observe changes to the profile pref store. So the order is: 1) set value in profile pref store -> change happens 2) set value in extensions pref store Unfortunately, we ask in the observer whether pref->IsExtensionControlled()[2], which check which store the value comes from. This will change on the next line of code, but isn't updated yet. I considered just changing the order (which might be valid), but I think asyncrifying potentially solves other types of observer order issues. R=rdevlin.cronin@chromium.org BUG=693226 [1] https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/preference/preference_api.cc?type=cs&q=passwordsavingenabled&l=448,446 [2] https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/settings_private/prefs_util.cc?q=prefs_util.cc&sq=package:chromium&dr&l=486,751 Review-Url: https://codereview.chromium.org/2742663002 Cr-Commit-Position: refs/heads/master@{#456155} Committed: https://chromium.googlesource.com/chromium/src/+/4a3253c3dc5edc041db7f64cca32476181f09013

Patch Set 1 : asdf #

Total comments: 2

Patch Set 2 : threadtaskrunnerhandle #

Patch Set 3 : damn 's' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M chrome/browser/extensions/api/settings_private/settings_private_event_router.h View 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/settings_private/settings_private_event_router.cc View 1 2 3 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 26 (20 generated)
Dan Beam
3 years, 9 months ago (2017-03-09 05:14:04 UTC) #5
Dan Beam
thanks for you help today, pretty sure that worked!
3 years, 9 months ago (2017-03-10 08:03:09 UTC) #17
Devlin
lgtm nit: Take this line out of the description; probably doesn't need to be archived ...
3 years, 9 months ago (2017-03-10 20:01:25 UTC) #18
Dan Beam
https://codereview.chromium.org/2742663002/diff/60001/chrome/browser/extensions/api/settings_private/settings_private_event_router.cc File chrome/browser/extensions/api/settings_private/settings_private_event_router.cc (right): https://codereview.chromium.org/2742663002/diff/60001/chrome/browser/extensions/api/settings_private/settings_private_event_router.cc#newcode128 chrome/browser/extensions/api/settings_private/settings_private_event_router.cc:128: // as |pref_utils_->GetPref()| relies on this information to determine ...
3 years, 9 months ago (2017-03-10 20:06:22 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2742663002/100001
3 years, 9 months ago (2017-03-10 20:08:25 UTC) #23
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 20:56:51 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/4a3253c3dc5edc041db7f64cca32...

Powered by Google App Engine
This is Rietveld 408576698