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

Issue 2886043002: Refrain from sending hit report when user is in incognito mode (Closed)

Created:
3 years, 7 months ago by mortonm
Modified:
3 years, 7 months ago
CC:
chromium-reviews, grt+watch_chromium.org, vakh+watch_chromium.org, timvolodine
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Even if user has SafeBrowsing Extended Reporting enabled, we want to refrain from sending a hit report when the user is in incognito mode. BUG=689149 Review-Url: https://codereview.chromium.org/2886043002 Cr-Commit-Position: refs/heads/master@{#473360} Committed: https://chromium.googlesource.com/chromium/src/+/cdcd0b7cbe1630435abab4a03ca0543752138b56

Patch Set 1 #

Patch Set 2 : checkpoint for incognito fix #

Patch Set 3 : debugging incognito changes #

Patch Set 4 : further debugging #

Patch Set 5 : ready for formatting #

Patch Set 6 : ready for review #

Total comments: 14

Patch Set 7 : refactoring incognito browser object #

Total comments: 2

Patch Set 8 : fixed comment typo #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -46 lines) Patch
M chrome/browser/safe_browsing/download_protection_service.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc View 1 2 3 4 5 6 7 28 chunks +109 lines, -31 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.h View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 2 comments Download
M chrome/browser/safe_browsing/ui_manager.cc View 1 2 3 4 5 6 2 chunks +16 lines, -4 lines 7 comments Download
M components/safe_browsing/base_ui_manager.h View 1 2 1 chunk +2 lines, -1 line 2 comments Download
M components/safe_browsing/base_ui_manager.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 2 comments Download

Messages

Total messages: 23 (14 generated)
mortonm
3 years, 7 months ago (2017-05-18 22:06:44 UTC) #8
Jialiu Lin
Almost there, excellent work! A couple of minor things: Please follow the following guidelines to ...
3 years, 7 months ago (2017-05-18 22:32:13 UTC) #9
Jialiu Lin
LGTM with 1 more comment Generally, we'd prefer replying every comment in the review. You ...
3 years, 7 months ago (2017-05-19 20:14:02 UTC) #11
mortonm
All comments have been addressed. https://codereview.chromium.org/2886043002/diff/100001/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc File chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc (right): https://codereview.chromium.org/2886043002/diff/100001/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc#newcode218 chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc:218: bool hit_report_sent_ = false; ...
3 years, 7 months ago (2017-05-19 20:21:04 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2886043002/140001
3 years, 7 months ago (2017-05-19 20:26:25 UTC) #15
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/cdcd0b7cbe1630435abab4a03ca0543752138b56
3 years, 7 months ago (2017-05-19 22:20:20 UTC) #18
vakh (use Gerrit instead)
lgtm Congrats on your first commit!! Woohoo!! Sorry for the post-commmit drive-by review. I missed ...
3 years, 7 months ago (2017-05-19 22:41:13 UTC) #21
mortonm
Going to include changes as per Varun's comments in a different CL. https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_browsing/ui_manager.cc File chrome/browser/safe_browsing/ui_manager.cc ...
3 years, 7 months ago (2017-05-19 22:52:42 UTC) #22
mortonm
3 years, 7 months ago (2017-05-22 17:03:59 UTC) #23
Message was sent while issue was closed.
The changes to the code are in a different CL for which I will request LGTMs
from vakh@ and jialiul@.

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
File chrome/browser/safe_browsing/ui_manager.cc (right):

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
chrome/browser/safe_browsing/ui_manager.cc:106: // Static
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> nit: static

Done.

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
chrome/browser/safe_browsing/ui_manager.cc:108: WebContents* web_contents) {
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> could web_contents also be const?

Done.

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
chrome/browser/safe_browsing/ui_manager.cc:111: return true;
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> simpler re-write:
> return hit_report.extended_reporting_level != SBER_LEVEL_OFF &&
> !web_contents->GetBrowserContext()->IsOffTheRecord()

Done.

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
File chrome/browser/safe_browsing/ui_manager.h (right):

https://codereview.chromium.org/2886043002/diff/140001/chrome/browser/safe_br...
chrome/browser/safe_browsing/ui_manager.h:72: // non-empty, the request will be
sent as a POST instead of a GET.
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> I don't see the |post_data| argument to the function. I think this comment is
in
> dire need of an update. It also needs to mention that the report is not sent
> from Incognito mode.

Done.

https://codereview.chromium.org/2886043002/diff/140001/components/safe_browsi...
File components/safe_browsing/base_ui_manager.cc (right):

https://codereview.chromium.org/2886043002/diff/140001/components/safe_browsi...
components/safe_browsing/base_ui_manager.cc:247: // A safebrowsing hit is sent
after a blocking page for malware/phishing
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> nit: SafeBrowsing

Done.

https://codereview.chromium.org/2886043002/diff/140001/components/safe_browsi...
File components/safe_browsing/base_ui_manager.h (right):

https://codereview.chromium.org/2886043002/diff/140001/components/safe_browsi...
components/safe_browsing/base_ui_manager.h:64: // to the server. Can only be
called on UI thread.
On 2017/05/19 22:41:13, vakh (Varun Khaneja) wrote:
> Please update this comment also to include the Incognito mode exception.

Done.

Powered by Google App Engine
This is Rietveld 408576698