It is possible for both webapp dialog and WebAPK infobar to show |
||
Issue description
AddToHomescreenDataFetcher is asynchronous. The following sequence of events will cause both the dialog and the infobar to show
AddToHomescreenDataFetcher::Start()
AddToHomescreenDataFetcher::OnDataTimedOut()
--> This calls
AddToHomescreenManager::OnDidDetermineWebApkCompatibility(false)
which causes the dialog to show
AddToHomescreenDataFetcher::OnDidPerformInstallableCheck()
--> This calls
AddToHomescreenManager::OnDidDetermineWebApkCompatibility(true)
which causes the WebAPK infobar to show when
AddToHomescreenManager::OnDataAvailable() is called
,
Mar 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c6d0b9a7b969fbb957b9f5960ceff6a2cc37ce1 commit 3c6d0b9a7b969fbb957b9f5960ceff6a2cc37ce1 Author: zpeng <zpeng@chromium.org> Date: Wed Mar 01 23:29:23 2017 Make OnDataTimedout and OnDidPerformInstallableCheck mutually exclusive. AddToHomescreenDataFetcher::OnDataTimedout() and AddToHomescreenDataFetcher::OnDidPerformInstallableCheck() are the success and timeout callbacks for fetching data. This CL makes them mutually exclusive. As both functions are run on the same thread, locks are unnecessary for this case. BUG= 692626 Review-Url: https://codereview.chromium.org/2720083002 Cr-Commit-Position: refs/heads/master@{#454092} [modify] https://crrev.com/3c6d0b9a7b969fbb957b9f5960ceff6a2cc37ce1/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc [modify] https://crrev.com/3c6d0b9a7b969fbb957b9f5960ceff6a2cc37ce1/chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc
,
Mar 2 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by pkotw...@chromium.org
, Feb 15 2017Components: Mobile>WebAPKs
Labels: -Pri-3 OS-Android Pri-2
Owner: zpeng@chromium.org
Status: Assigned (was: Untriaged)