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

Issue 1784433003: Track CTR of uncommon download warning. (Closed)

Created:
4 years, 9 months ago by Jialiu Lin
Modified:
4 years, 9 months ago
Reviewers:
asanka, Nathan Parker, Nico
CC:
asanka, chromium-reviews, darin-cc_chromium.org, grt+watch_chromium.org, jam, Randy Smith (Not in Mondays)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track CTR of uncommon download warning. 1) When user click through a uncommon download warning, a serialized CSD ClientSafeBrowsingReportRequest will be sent to track CTR. 2) add browsertest in DownloadTest to capture this new feature. BUG=574590 Committed: https://crrev.com/bd9ba658cc76a6112bf1327720c457251bd6ec44 Cr-Commit-Position: refs/heads/master@{#382067}

Patch Set 1 #

Patch Set 2 : cl format #

Total comments: 6

Patch Set 3 : address asanka's comment #

Patch Set 4 : nit #

Total comments: 4

Patch Set 5 : change to ON_DANGEROUS_DOWNLOAD_QUIT #

Total comments: 8

Patch Set 6 : Add FakeDownloadProtectionService #

Patch Set 7 : remove empty line #

Patch Set 8 : Fix all the breaking tests #

Patch Set 9 : move function inside FULL_SAFE_BROWSING macros #

Total comments: 6

Patch Set 10 : nit #

Total comments: 7

Patch Set 11 : Add one more test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -10 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +139 lines, -0 lines 1 comment Download
M chrome/browser/download/download_commands.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +30 lines, -0 lines 0 comments Download
M chrome/browser/download/download_danger_prompt.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_danger_prompt_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 34 (11 generated)
Jialiu Lin
Hi rdsmith@, Could you take a look? Thanks!
4 years, 9 months ago (2016-03-10 03:23:45 UTC) #4
Randy Smith (Not in Mondays)
Asanka's a better person than I for this type of thing, if he's available.
4 years, 9 months ago (2016-03-10 15:54:45 UTC) #6
Jialiu Lin
On 2016/03/10 15:54:45, Randy Smith - Not in Fridays wrote: > Asanka's a better person ...
4 years, 9 months ago (2016-03-10 21:03:39 UTC) #7
asanka
This only works if the user keeps the download via the download shelf context menu, ...
4 years, 9 months ago (2016-03-11 03:43:26 UTC) #8
Jialiu Lin
Hi Asanka, Thanks for your review! Yes, this CL only deals with the Keep button ...
4 years, 9 months ago (2016-03-11 05:03:48 UTC) #9
asanka
https://codereview.chromium.org/1784433003/diff/60001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1784433003/diff/60001/chrome/browser/download/download_browsertest.cc#newcode254 chrome/browser/download/download_browsertest.cc:254: class DownloadTestObserverAcceptUncommon Rather than going this route, can you ...
4 years, 9 months ago (2016-03-11 22:05:33 UTC) #10
Jialiu Lin
Thanks Asanka! This is brilliant suggestion. I guess I was too obsessed with mimicking the ...
4 years, 9 months ago (2016-03-12 00:15:27 UTC) #11
asanka
https://codereview.chromium.org/1784433003/diff/80001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1784433003/diff/80001/chrome/browser/download/download_browsertest.cc#newcode393 chrome/browser/download/download_browsertest.cc:393: class FakeSafeBrowsingService : public safe_browsing::SafeBrowsingService { This the 7th ...
4 years, 9 months ago (2016-03-14 18:13:46 UTC) #12
Jialiu Lin
Thank you so much for walking me around this download browser test, Asanka! https://codereview.chromium.org/1784433003/diff/80001/chrome/browser/download/download_browsertest.cc File ...
4 years, 9 months ago (2016-03-14 23:54:04 UTC) #13
Jialiu Lin
On 2016/03/14 23:54:04, JialiuLin wrote: > Thank you so much for walking me around this ...
4 years, 9 months ago (2016-03-15 01:18:56 UTC) #14
Jialiu Lin
Hi Asanka, All try bots are green now. Also add Nathan to the reviewer list. ...
4 years, 9 months ago (2016-03-15 19:54:39 UTC) #16
asanka
LGTM % nits. Thanks! Also you need to update the CL description. Eventually I'd like ...
4 years, 9 months ago (2016-03-16 01:29:51 UTC) #17
Jialiu Lin
Thanks for your thorough review, Asanka! https://codereview.chromium.org/1784433003/diff/160001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1784433003/diff/160001/chrome/browser/download/download_browsertest.cc#newcode1144 chrome/browser/download/download_browsertest.cc:1144: InProcessBrowserTest::SetUp(); On 2016/03/16 ...
4 years, 9 months ago (2016-03-16 02:43:43 UTC) #19
Jialiu Lin
Hi Nathan, Could you take a look? Thanks!
4 years, 9 months ago (2016-03-17 03:01:42 UTC) #20
Nathan Parker
(trying out new codereview UI -- lemme know if this looks weird). https://codereview.chromium.org/1784433003/diff/180001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc ...
4 years, 9 months ago (2016-03-17 17:33:12 UTC) #21
Nathan Parker
https://codereview.chromium.org/1784433003/diff/180001/chrome/browser/download/download_commands.cc File chrome/browser/download/download_commands.cc (right): https://codereview.chromium.org/1784433003/diff/180001/chrome/browser/download/download_commands.cc#newcode289 chrome/browser/download/download_commands.cc:289: content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT && On 2016/03/17 at 17:33:12, Nathan Parker wrote: ...
4 years, 9 months ago (2016-03-17 17:34:39 UTC) #22
Jialiu Lin
Thanks, Nathan. Your comments are all addressed. https://codereview.chromium.org/1784433003/diff/180001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1784433003/diff/180001/chrome/browser/download/download_browsertest.cc#newcode3351 chrome/browser/download/download_browsertest.cc:3351: IN_PROC_BROWSER_TEST_F( On ...
4 years, 9 months ago (2016-03-17 20:14:44 UTC) #23
Nathan Parker
lgtm
4 years, 9 months ago (2016-03-18 19:35:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1784433003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1784433003/200001
4 years, 9 months ago (2016-03-18 19:36:43 UTC) #27
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 9 months ago (2016-03-18 20:23:55 UTC) #29
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/bd9ba658cc76a6112bf1327720c457251bd6ec44 Cr-Commit-Position: refs/heads/master@{#382067}
4 years, 9 months ago (2016-03-18 20:25:21 UTC) #31
Nico
/b/build/slave/ClangToTLinux/build/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: warning: while linking browser_tests: symbol 'TestSafeBrowsingServiceFactory::CreateSafeBrowsingService()' defined in multiple places (possible ODR violation): ../../chrome/browser/download/download_danger_prompt_browsertest.cc:61 ...
4 years, 9 months ago (2016-03-21 16:03:42 UTC) #33
Jialiu Lin
4 years, 9 months ago (2016-03-21 17:55:56 UTC) #34
Message was sent while issue was closed.
On 2016/03/21 at 16:03:42, thakis wrote:
>
/b/build/slave/ClangToTLinux/build/src/third_party/binutils/Linux_x64/Release/bin/ld.gold:
warning: while linking browser_tests: symbol
'TestSafeBrowsingServiceFactory::CreateSafeBrowsingService()' defined in
multiple places (possible ODR violation):
>   ../../chrome/browser/download/download_danger_prompt_browsertest.cc:61 from
obj/chrome/browser/download/browser_tests.download_danger_prompt_browsertest.o
>   ../../chrome/browser/download/download_browsertest.cc:1121 from
obj/chrome/browser/download/browser_tests.download_browsertest.o
>
/b/build/slave/ClangToTLinux/build/src/third_party/binutils/Linux_x64/Release/bin/ld.gold:
error: treating warnings as errors
> 
>
https://codereview.chromium.org/1784433003/diff/200001/chrome/browser/downloa...
> File chrome/browser/download/download_browsertest.cc (right):
> 
>
https://codereview.chromium.org/1784433003/diff/200001/chrome/browser/downloa...
> chrome/browser/download/download_browsertest.cc:1116: class
TestSafeBrowsingServiceFactory
> This is 8th TestSafeBrowsingServiceFactory we have:
https://code.google.com/p/chromium/codesearch#search/&q=TestSafeBrowsingServi...
> 
> It's also not in an unnamed namespace and different from the others, so it
causes ODR troubles in practice:
> 
>
https://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux/builds/4650/...
> 
> I don't know why the normal bots didn't catch this, but please fix.
> 
> (I'll paste the error in a second, but pasting it into this text box
reproducibly crashes chrome's renderer.)

Sorry about this problem. I'll move them to unnamed namespace in a minutes.
W.R.T the 8th TestSafeBrowsingService/TestSafeBrowsingServiceFactory,
https://crbug.com/594683 is filed.

Powered by Google App Engine
This is Rietveld 408576698