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

Issue 6308009: If user had consented for metrics reporting, send speech input request origin to the server. (Closed)

Created:
9 years, 11 months ago by Satish
Modified:
9 years, 7 months ago
Reviewers:
hans, jam, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, jam, Paweł Hajdan Jr.
Visibility:
Public.

Description

If user had consented for metrics reporting, send speech input request origin to the server. This is the chromium side of the webkit patch https://bugs.webkit.org/show_bug.cgi?id=52718. Suggested reviewer split: wtc@ - the 2 url_fetcher.* files hans@ - rest of the files I needed to add a URLFetcher::set_referrer() method to send the origin url in the Referer header. Also I had to create a new IPC params struct for startRecognition since the number of parameters exceed what is provided by the macros. And in the process I also moved the speech input IPC messages to their own source files. BUG=none TEST=No change in functionality except additional debug info sent to server. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71949

Patch Set 1 #

Patch Set 2 : Added missing files #

Total comments: 8

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -145 lines) Patch
M chrome/browser/speech/speech_input_browsertest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/speech/speech_input_dispatcher_host.h View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/speech/speech_input_dispatcher_host.cc View 1 2 7 chunks +19 lines, -22 lines 0 comments Download
M chrome/browser/speech/speech_input_manager.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/speech/speech_input_manager.cc View 1 2 8 chunks +32 lines, -21 lines 0 comments Download
M chrome/browser/speech/speech_recognition_request.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/speech/speech_recognition_request.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/speech/speech_recognition_request_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/speech/speech_recognizer.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/speech/speech_recognizer.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/speech/speech_recognizer_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_common.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/net/url_fetcher.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/net/url_fetcher.cc View 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 2 chunks +0 lines, -12 lines 0 comments Download
M chrome/common/render_messages.cc View 1 2 2 chunks +0 lines, -23 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 chunks +0 lines, -41 lines 0 comments Download
A chrome/common/speech_input_messages.h View 1 2 1 chunk +93 lines, -0 lines 0 comments Download
A chrome/common/speech_input_messages.cc View 1 2 1 chunk +83 lines, -0 lines 0 comments Download
M chrome/renderer/speech_input_dispatcher.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/speech_input_dispatcher.cc View 3 chunks +21 lines, -12 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Satish
9 years, 11 months ago (2011-01-19 17:31:47 UTC) #1
jam
yay for moving messages out of render_messages :) I don't see speech_input_messages.h in this change ...
9 years, 11 months ago (2011-01-19 18:09:52 UTC) #2
Satish
oops, added now.
9 years, 11 months ago (2011-01-19 20:13:08 UTC) #3
jam
http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_messages.cc File chrome/common/speech_input_messages.cc (right): http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_messages.cc#newcode8 chrome/common/speech_input_messages.cc:8: #include "chrome/common/speech_input_messages.h" the above two lines should be after ...
9 years, 11 months ago (2011-01-19 20:29:23 UTC) #4
wtc
LGTM on url_fetcher.{h,cc}. http://codereview.chromium.org/6308009/diff/4001/chrome/common/net/url_fetcher.h File chrome/common/net/url_fetcher.h (right): http://codereview.chromium.org/6308009/diff/4001/chrome/common/net/url_fetcher.h#newcode142 chrome/common/net/url_fetcher.h:142: // The referrer URL for the ...
9 years, 11 months ago (2011-01-19 22:22:02 UTC) #5
hans
lgtm http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_messages.h File chrome/common/speech_input_messages.h (right): http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_messages.h#newcode69 chrome/common/speech_input_messages.h:69: // speech recognizer. If speech recognition is not ...
9 years, 11 months ago (2011-01-20 09:29:29 UTC) #6
Satish
9 years, 11 months ago (2011-01-20 11:04:11 UTC) #7
Thanks for the quick reviews. I have addressed all comments, will submit
shortly.

http://codereview.chromium.org/6308009/diff/4001/chrome/common/net/url_fetcher.h
File chrome/common/net/url_fetcher.h (right):

http://codereview.chromium.org/6308009/diff/4001/chrome/common/net/url_fetche...
chrome/common/net/url_fetcher.h:142: // The referrer URL for the request, to be
set before Start() is called.
On 2011/01/19 22:22:02, wtc wrote:
> Nit: I suggest you copy the same sentence
>     Must be called before the request is started.
> that's used in other setters (line 136, line 145, line
> 149, etc.).

Done.

http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_m...
File chrome/common/speech_input_messages.cc (right):

http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_m...
chrome/common/speech_input_messages.cc:8: #include
"chrome/common/speech_input_messages.h"
On 2011/01/19 20:29:23, John Abd-El-Malek wrote:
> the above two lines should be after all other includes.  that's the style for
> X_messages.cc, since it avoids compile errors.  In this case,
> speech_input_result.h is already included by speech_input_messages.h, so you
can
> take it out from here (if it wasn't included in the header, you'd get a
compile
> error if this wasn't before #IPC_MESSAGE_IMPL)

Removed speech_input_result.h as suggested

http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_m...
File chrome/common/speech_input_messages.h (right):

http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_m...
chrome/common/speech_input_messages.h:65: int /* request id */)
On 2011/01/19 20:29:23, John Abd-El-Malek wrote:
> nit: the usual style for parameter names inside the comments is to name it
just
> like the dispatcher function names is parameters.  this is useful in case in
the
> future we change how IPC messages are declared (i.e. IDLs) and we want to use
a
> script to generate the IDLs.

Changed to 'request_id' in all these declarations

http://codereview.chromium.org/6308009/diff/4001/chrome/common/speech_input_m...
chrome/common/speech_input_messages.h:69: // speech recognizer. If speech
recognition is not happening nor or is
On 2011/01/20 09:29:29, hans wrote:
> "nor or" ?

Removed 'nor'

Powered by Google App Engine
This is Rietveld 408576698