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

Issue 654613004: [Hotword] Delay checking for audio devices until needed. (Closed)

Created:
6 years, 2 months ago by rpetterson
Modified:
6 years, 2 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Hotword] Delay checking for audio devices until needed. Checking for audio devices right away is causing performance regressions on Mac. This CL delays checking until needed, but does not include the availability of an audio capture device in the error reporting until after it's known the check has been completed. Otherwise, the settings page immediately displays an error upon opening. In general, this should not be a problem as typically the audio device check will have completed by the time the user goes to the settings page. There is a rare use case, where the user installs Chrome and immediately goes to settings and in that case, we won't be able to accurately report if there is an audio device preventing the user from starting hotwording. However, by the time they reload, the error should be present which should be sufficient. BUG=385514, 413104 Committed: https://crrev.com/78f60ef1ef5a8f4af3317383985955da4f1d4fdb Cr-Commit-Position: refs/heads/master@{#300965}

Patch Set 1 #

Patch Set 2 : updating logic in isAvailable #

Total comments: 2

Patch Set 3 : redoing logic #

Total comments: 3

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -43 lines) Patch
M chrome/browser/search/hotword_service.h View 1 2 3 2 chunks +1 line, -7 lines 0 comments Download
M chrome/browser/search/hotword_service.cc View 1 2 3 3 chunks +14 lines, -27 lines 0 comments Download
M chrome/browser/search/hotword_service_factory.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/search/hotword_service_factory.cc View 1 2 2 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
rpetterson
6 years, 2 months ago (2014-10-17 19:34:36 UTC) #2
Anand Mistry (off Chromium)
https://codereview.chromium.org/654613004/diff/20001/chrome/browser/search/hotword_service.cc File chrome/browser/search/hotword_service.cc (right): https://codereview.chromium.org/654613004/diff/20001/chrome/browser/search/hotword_service.cc#newcode401 chrome/browser/search/hotword_service.cc:401: HotwordServiceFactory::GetInstance()->UpdateMicrophoneState(); If you call UpdateMicrophoneState() first, then IsAudioDeviceStateUpdated() will ...
6 years, 2 months ago (2014-10-17 20:32:42 UTC) #4
rpetterson
https://codereview.chromium.org/654613004/diff/20001/chrome/browser/search/hotword_service.cc File chrome/browser/search/hotword_service.cc (right): https://codereview.chromium.org/654613004/diff/20001/chrome/browser/search/hotword_service.cc#newcode401 chrome/browser/search/hotword_service.cc:401: HotwordServiceFactory::GetInstance()->UpdateMicrophoneState(); On 2014/10/17 20:32:42, Anand Mistry wrote: > If ...
6 years, 2 months ago (2014-10-20 06:25:50 UTC) #6
Anand Mistry (off Chromium)
https://codereview.chromium.org/654613004/diff/40001/chrome/browser/search/hotword_service_factory.cc File chrome/browser/search/hotword_service_factory.cc (right): https://codereview.chromium.org/654613004/diff/40001/chrome/browser/search/hotword_service_factory.cc#newcode92 chrome/browser/search/hotword_service_factory.cc:92: MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices(); I think you've introduced a race here. If ...
6 years, 2 months ago (2014-10-20 07:09:05 UTC) #7
rpetterson
If this would be easier to discuss over chat, ping me when you get in ...
6 years, 2 months ago (2014-10-20 17:25:07 UTC) #8
Anand Mistry (off Chromium)
lgtm https://codereview.chromium.org/654613004/diff/40001/chrome/browser/search/hotword_service_factory.cc File chrome/browser/search/hotword_service_factory.cc (right): https://codereview.chromium.org/654613004/diff/40001/chrome/browser/search/hotword_service_factory.cc#newcode92 chrome/browser/search/hotword_service_factory.cc:92: MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices(); On 2014/10/20 17:25:07, rpetterson wrote: > On ...
6 years, 2 months ago (2014-10-20 21:22:54 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654613004/40001
6 years, 2 months ago (2014-10-21 18:00:21 UTC) #11
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 2 months ago (2014-10-21 18:00:29 UTC) #13
rpetterson
Jered, requesting an OWNERS stamp. Anand has already reviewed (see discussion)
6 years, 2 months ago (2014-10-21 18:02:59 UTC) #15
Jered
On 2014/10/21 18:02:59, rpetterson wrote: > Jered, requesting an OWNERS stamp. Anand has already reviewed ...
6 years, 2 months ago (2014-10-21 18:09:53 UTC) #16
rpetterson
On 2014/10/21 18:09:53, Jered wrote: > On 2014/10/21 18:02:59, rpetterson wrote: > > Jered, requesting ...
6 years, 2 months ago (2014-10-21 18:18:26 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654613004/40001
6 years, 2 months ago (2014-10-21 18:20:29 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/19014) linux_chromium_compile_dbg_32 on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32/builds/3360) ios_dbg_simulator ...
6 years, 2 months ago (2014-10-21 18:26:13 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/654613004/60001
6 years, 2 months ago (2014-10-23 21:31:35 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years, 2 months ago (2014-10-23 23:01:06 UTC) #24
commit-bot: I haz the power
6 years, 2 months ago (2014-10-23 23:01:28 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/78f60ef1ef5a8f4af3317383985955da4f1d4fdb
Cr-Commit-Position: refs/heads/master@{#300965}

Powered by Google App Engine
This is Rietveld 408576698