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

Issue 778393002: Add OAuth2 authentication for some voice transcription requests. (Closed)

Created:
6 years ago by Anand Mistry (off Chromium)
Modified:
6 years ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, jam, darin-cc_chromium.org, gshires1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add OAuth2 authentication for speech recognition requests from the launcher, when audio-history is opted-into. Audio history allows a user to see the speech recognition result at https://history.google.com/history/audio. This change will attach an auth (OAuth2) token to the recognition request, which is used to associate the request with the user. This only happens when the user opts-in to audio history, and only on speech recognition from the app launcher. This change adds a helper class that handles retrieving and refreshing the auth token, and plumbs that token into the speech recognition request. BUG=397019 Committed: https://crrev.com/7e93806b149d4378f5032bcd3a6c65b4e64f7774 Cr-Commit-Position: refs/heads/master@{#308270}

Patch Set 1 #

Patch Set 2 : Compile fix. #

Patch Set 3 : Another compile fix. #

Patch Set 4 : Oops. Don't use an initializer list. #

Patch Set 5 : Prune ChromeOS dependencies from test. #

Patch Set 6 : Fix unit test on Chrome. #

Total comments: 15

Patch Set 7 : Review comments. #

Total comments: 2

Patch Set 8 : Inject clock for testing. #

Total comments: 4

Patch Set 9 : URL escape auth parameters. #

Patch Set 10 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -6 lines) Patch
A chrome/browser/ui/app_list/speech_auth_helper.h View 1 2 3 4 5 6 7 1 chunk +67 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/speech_auth_helper.cc View 1 2 3 4 5 6 7 1 chunk +127 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/speech_auth_helper_unittest.cc View 1 2 3 4 5 6 7 1 chunk +122 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/speech_recognizer.cc View 5 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/ui/app_list/speech_recognizer_browsertest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/app_list/speech_recognizer_delegate.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/start_page_service.h View 1 2 3 4 5 6 7 5 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/app_list/start_page_service.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/speech/google_streaming_remote_engine.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/speech/speech_recognition_engine.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.cc View 2 chunks +3 lines, -1 line 0 comments Download
M content/public/browser/speech_recognition_session_config.h View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (7 generated)
Anand Mistry (off Chromium)
mgiuca@chromium.org: Please review changes in app_list hans@chromium.org: Please review changes in content/browser/speech thestig@chromium.org: Please review ...
6 years ago (2014-12-08 04:32:05 UTC) #2
Anand Mistry (off Chromium)
mgiuca@chromium.org: Please review changes in app_list hans@chromium.org: Please review changes in content/browser/speech thestig@chromium.org: Please review ...
6 years ago (2014-12-08 04:32:06 UTC) #4
Anand Mistry (off Chromium)
mgiuca@chromium.org: Please review changes in app_list hans@chromium.org: Please review changes in content/browser/speech thestig@chromium.org: Please review ...
6 years ago (2014-12-08 04:32:46 UTC) #6
Anand Mistry (off Chromium)
-Matt, +Chris
6 years ago (2014-12-08 04:48:38 UTC) #8
hans
The change description doesn't explain what's going on. I guess it has the "what" but ...
6 years ago (2014-12-08 17:55:36 UTC) #9
calamity
https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc File chrome/browser/ui/app_list/speech_auth_helper.cc (right): https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc#newcode33 chrome/browser/ui/app_list/speech_auth_helper.cc:33: ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); Hmm. Can we factor token_service into a member ...
6 years ago (2014-12-09 02:21:17 UTC) #10
calamity
https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc File chrome/browser/ui/app_list/speech_auth_helper.cc (right): https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc#newcode59 chrome/browser/ui/app_list/speech_auth_helper.cc:59: base::Time now = base::Time::Now(); On 2014/12/09 02:21:16, calamity wrote: ...
6 years ago (2014-12-09 07:11:21 UTC) #11
Anand Mistry (off Chromium)
hans: I updated the description with a bit more info. As for why the bug ...
6 years ago (2014-12-10 02:13:25 UTC) #12
calamity
lgtm. https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc File chrome/browser/ui/app_list/speech_auth_helper.cc (right): https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc#newcode59 chrome/browser/ui/app_list/speech_auth_helper.cc:59: base::Time now = base::Time::Now(); On 2014/12/10 02:13:25, Anand ...
6 years ago (2014-12-10 02:26:13 UTC) #13
Lei Zhang
chrome gypi change lgtm
6 years ago (2014-12-10 02:32:46 UTC) #14
Anand Mistry (off Chromium)
https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc File chrome/browser/ui/app_list/speech_auth_helper.cc (right): https://codereview.chromium.org/778393002/diff/100001/chrome/browser/ui/app_list/speech_auth_helper.cc#newcode59 chrome/browser/ui/app_list/speech_auth_helper.cc:59: base::Time now = base::Time::Now(); On 2014/12/10 02:26:13, calamity wrote: ...
6 years ago (2014-12-10 03:52:15 UTC) #15
hans
> hans: I updated the description with a bit more info. Thanks! Much appreciated. https://codereview.chromium.org/778393002/diff/140001/content/browser/speech/google_streaming_remote_engine.cc ...
6 years ago (2014-12-10 17:45:37 UTC) #16
Anand Mistry (off Chromium)
https://codereview.chromium.org/778393002/diff/140001/content/browser/speech/google_streaming_remote_engine.cc File content/browser/speech/google_streaming_remote_engine.cc (right): https://codereview.chromium.org/778393002/diff/140001/content/browser/speech/google_streaming_remote_engine.cc#newcode7 content/browser/speech/google_streaming_remote_engine.cc:7: #include <algorithm> On 2014/12/10 17:45:37, hans wrote: > Is ...
6 years ago (2014-12-10 22:43:21 UTC) #17
hans
content/browser/speech lgtm
6 years ago (2014-12-10 22:46:16 UTC) #18
Anand Mistry (off Chromium)
rlp, sievers: Ping! I'd like to get this in before next week's dev channel build.
6 years ago (2014-12-12 05:25:11 UTC) #19
rpetterson
Didn't realize you were waiting on me. Overall LGTM. On Dec 11, 2014 9:25 PM, ...
6 years ago (2014-12-12 05:35:23 UTC) #20
rpetterson
Trying the whole LGTM thing again (since it apparently didn't work via email :P )
6 years ago (2014-12-12 19:34:00 UTC) #21
no sievers
lgtm
6 years ago (2014-12-12 20:39:37 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/778393002/180001
6 years ago (2014-12-13 01:01:28 UTC) #24
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years ago (2014-12-13 07:03:09 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/778393002/180001
6 years ago (2014-12-13 12:13:52 UTC) #28
commit-bot: I haz the power
Committed patchset #10 (id:180001)
6 years ago (2014-12-13 12:44:26 UTC) #29
commit-bot: I haz the power
6 years ago (2014-12-13 12:46:15 UTC) #30
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/7e93806b149d4378f5032bcd3a6c65b4e64f7774
Cr-Commit-Position: refs/heads/master@{#308270}

Powered by Google App Engine
This is Rietveld 408576698