Avoid touching TrackedPreferencesMigrator's ref count before it's fully constructed
The first reference to a TrackedPreferencesMigrator instance used to be made in its constructor implicitly. Though this case is safe as the reference keeps alive until the other reference is made, it's error prone to make the first reference in the ctor, and an upcoming change to base::Bind rejects to make the first reference. This CL moves the implicit ref count manipulation through base::Bind() out of the constructor, so that we can avoid making the implicit first reference creation. Bug: 866456 Change-Id: I3563296c0f972d57ad8cc0c2f6e32658b9d6293d Reviewed-on: https://chromium-review.googlesource.com/1156706Reviewed-by:Gabriel Charette <gab@chromium.org> Commit-Queue: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#579550}
Showing
Please register or sign in to comment