New issue
Advanced search Search tips

Issue 895618 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Determine if OptimizationGuideService needs AddObserver (etc.) to support multiple threads

Project Member Reported by ryansturm@chromium.org, Oct 15

Issue description

Currently, if OptimizationGuideService::AddObserver is called on the thread it does not live on (UI thread after previews s13n is landed), it will add the observer on the UI thread. When dispatching events, the implementations will only respond on the UI thread, meaning the observer needs to functionally exist on the UI thread. This behavior seems unnecessary and should be simplified if possible.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7054c49c2d993a2ec898340db2cad1c372ab2223

commit 7054c49c2d993a2ec898340db2cad1c372ab2223
Author: Ryan Sturm <ryansturm@chromium.org>
Date: Thu Nov 01 21:40:37 2018

[Previews] Only allow opt guide observers on UI thread

This CL removes code that allows observers to be added from other
threads than the UI thread. We never supported posting to multiple threads
(note: IO used to be primary), so this is not needed.

Bug:  895618 
Change-Id: I23e85793eb6b18f8ad26799ad8b205787251f294
Reviewed-on: https://chromium-review.googlesource.com/c/1308612
Reviewed-by: Doug Arnett <dougarnett@chromium.org>
Commit-Queue: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604712}
[modify] https://crrev.com/7054c49c2d993a2ec898340db2cad1c372ab2223/components/optimization_guide/optimization_guide_service.cc
[modify] https://crrev.com/7054c49c2d993a2ec898340db2cad1c372ab2223/components/optimization_guide/optimization_guide_service.h

Status: Fixed (was: Assigned)

Sign in to add a comment