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

Issue 800523002: [Hotword] Sync Audio History pref every 24 hours, when opening chrome://settings and . . . (Closed)

Created:
6 years ago by rpetterson
Modified:
6 years ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, skanuj+watch_chromium.org, melevin+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, donnd+watch_chromium.org, jfweitz+watch_chromium.org, David Black, arv+watch_chromium.org, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, rlp+watch_chromium.org, Jered
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -42 lines) Patch
M chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc View 1 2 2 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/search/hotword_audio_history_handler.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/search/hotword_audio_history_handler.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +45 lines, -20 lines 0 comments Download
M chrome/browser/search/hotword_service.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/search/hotword_service_unittest.cc View 1 2 3 4 5 6 3 chunks +68 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +24 lines, -10 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
rpetterson
amistry: all hotword files: */hotword* dbeam: browser_options_handler.{cc,h}
6 years ago (2014-12-12 00:00:02 UTC) #3
rpetterson
Sending out to reviewers one more time since there were some hiccups with codereview. On ...
6 years ago (2014-12-12 00:01:26 UTC) #5
Dan Beam
lgtm https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode1680 chrome/browser/ui/webui/options/browser_options_handler.cc:1680: if (success && logging_enabled) { if !success or ...
6 years ago (2014-12-12 20:04:20 UTC) #6
rpetterson
https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode1680 chrome/browser/ui/webui/options/browser_options_handler.cc:1680: if (success && logging_enabled) { On 2014/12/12 20:04:20, Dan ...
6 years ago (2014-12-12 20:19:36 UTC) #7
Dan Beam
https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode1680 chrome/browser/ui/webui/options/browser_options_handler.cc:1680: if (success && logging_enabled) { On 2014/12/12 20:19:36, rpetterson ...
6 years ago (2014-12-12 20:25:46 UTC) #8
rpetterson
https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/800523002/diff/120001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode1680 chrome/browser/ui/webui/options/browser_options_handler.cc:1680: if (success && logging_enabled) { On 2014/12/12 20:25:46, Dan ...
6 years ago (2014-12-12 21:39:56 UTC) #9
Dan Beam
lgtm++ https://codereview.chromium.org/800523002/diff/160001/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): https://codereview.chromium.org/800523002/diff/160001/chrome/browser/resources/options/browser_options.js#newcode1234 chrome/browser/resources/options/browser_options.js:1234: * @param {boolean} visible Whether the audio history ...
6 years ago (2014-12-12 22:08:31 UTC) #10
rpetterson
https://codereview.chromium.org/800523002/diff/160001/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): https://codereview.chromium.org/800523002/diff/160001/chrome/browser/resources/options/browser_options.js#newcode1234 chrome/browser/resources/options/browser_options.js:1234: * @param {boolean} visible Whether the audio history section ...
6 years ago (2014-12-12 22:22:28 UTC) #11
Anand Mistry (off Chromium)
https://codereview.chromium.org/800523002/diff/180001/chrome/browser/search/hotword_audio_history_handler.cc File chrome/browser/search/hotword_audio_history_handler.cc (right): https://codereview.chromium.org/800523002/diff/180001/chrome/browser/search/hotword_audio_history_handler.cc#newcode49 chrome/browser/search/hotword_audio_history_handler.cc:49: // If the call was successful, set the last_successful ...
6 years ago (2014-12-13 00:29:49 UTC) #12
rpetterson
https://codereview.chromium.org/800523002/diff/180001/chrome/browser/search/hotword_audio_history_handler.cc File chrome/browser/search/hotword_audio_history_handler.cc (right): https://codereview.chromium.org/800523002/diff/180001/chrome/browser/search/hotword_audio_history_handler.cc#newcode49 chrome/browser/search/hotword_audio_history_handler.cc:49: // If the call was successful, set the last_successful ...
6 years ago (2014-12-13 01:12:02 UTC) #13
Anand Mistry (off Chromium)
lgtm
6 years ago (2014-12-13 01:44:42 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/800523002/220001
6 years ago (2014-12-13 16:06:51 UTC) #16
commit-bot: I haz the power
Committed patchset #12 (id:220001)
6 years ago (2014-12-13 17:02:25 UTC) #17
commit-bot: I haz the power
6 years ago (2014-12-13 17:03:12 UTC) #18
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/7c2b7812d442c5bb205fca74353d5f7f4a69bc0d
Cr-Commit-Position: refs/heads/master@{#308277}

Powered by Google App Engine
This is Rietveld 408576698