Description[Hotword] Sync Audio History pref every 24 hours, when opening
chrome://settings and upon HotwordService creation.
Note: This also changes HotwordAudioHistoryHandler to maintain the
previous state of the pref if a successful connection could not be made
with the server. A separate CL will be created for reporting an error in
connection to the user.
Adds a new function to browser_options_handler to be used as a callback
to the call GetAudioHistoryEnabled.
Adds a task_runner to HotwordAudioHistoryHandler to enable testing.
Test added: HotwordServiceTest.AudioHistorySyncOccurs.
Changes to hotword_private_apitest reflect the fact that
hotword_audio_history_handler now takes a task_runner and that the
previous state of the pref is maintained.
Issue 436683 is included in this because the times which we sync (every
24 hrs, profile startup, opening chrome://settings) are considered
sufficient enough to maintain state and close enough to launching for
the purpose of opening the audio_verification_app.
BUG=438451, 436683
Committed: https://crrev.com/7c2b7812d442c5bb205fca74353d5f7f4a69bc0d
Cr-Commit-Position: refs/heads/master@{#308277}
Patch Set 1 #Patch Set 2 : remove some debugging #Patch Set 3 : fixing test, pulling out part to another CL #Patch Set 4 : pull out another chunk to a separate CL #Patch Set 5 : change constant name #Patch Set 6 : fix compile error #Patch Set 7 : another compile error #
Total comments: 6
Patch Set 8 : curlies #Patch Set 9 : Doing It Right #
Total comments: 2
Patch Set 10 : switch param order #
Total comments: 6
Patch Set 11 : fix comments and include #Patch Set 12 : rebase #Messages
Total messages: 18 (4 generated)
|