Recently, BroadcastEventToObservers was added to PLM, which will allow Previews to send an opt out event directly to PLM. This should be the source for opt out instead of a direct post task from the infobar delegate.
Why is this needed in M-62?
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a3daa18dd96ac0a538c89e36152289bed4cfedbb commit a3daa18dd96ac0a538c89e36152289bed4cfedbb Author: Ryan Sturm <ryansturm@chromium.org> Date: Thu Jul 27 22:53:45 2017 Sourcing pingback opt outs from PLM observer Pingback previews opt outs use a complicated handshake with the pingback client to communicate opt outs and link them to PLM. It is more straightforward to pass opt out information through PLM instead of having pingback client use two sources of information. This is made possible by the recently added PLM event infrastructure. This CL removes a lot of code and adds a very small amount of code to pass the opt out alongside the other pingback information. Bug: 744922 Change-Id: Ied6182d307e3db24872615b6f8b10992e1204632 Reviewed-on: https://chromium-review.googlesource.com/574694 Reviewed-by: Tarun Bansal <tbansal@chromium.org> Reviewed-by: Bryan McQuade <bmcquade@chromium.org> Reviewed-by: Ryan Sturm <ryansturm@chromium.org> Commit-Queue: Ryan Sturm <ryansturm@chromium.org> Cr-Commit-Position: refs/heads/master@{#490042} [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/previews/previews_infobar_delegate.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/previews/previews_infobar_delegate_unittest.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/previews/previews_infobar_tab_helper.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/previews/previews_infobar_tab_helper.h [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/chrome/browser/previews/previews_infobar_tab_helper_unittest.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.h [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client_unittest.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.cc [modify] https://crrev.com/a3daa18dd96ac0a538c89e36152289bed4cfedbb/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h
Comment 1 by bengr@chromium.org
, Jul 18 2017