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

Issue 2795053002: [subresource_filter] Implement the "Smart" UI on Android (Closed)

Created:
3 years, 8 months ago by Charlie Harrison
Modified:
3 years, 7 months ago
CC:
chromium-reviews, msramek+watch_chromium.org, subresource-filter-reviews_chromium.org, jam, raymes+watch_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org, markusheintz_
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[subresource_filter] Implement the "Smart" UI on Android This patch implements a V1 for the "smart" UI, which just logs a timestamp every time the UI is shown, and will not show the UI on subsequent navigations if it is within 30 minutes of a previous impression. This is implemented using a new WebsiteSetting, which holds a timestamp. BUG=689992 Review-Url: https://codereview.chromium.org/2795053002 Cr-Commit-Position: refs/heads/master@{#470217} Committed: https://chromium.googlesource.com/chromium/src/+/3f8cdfd3ab1a3e87f90c37f3d7763483ac9e03c4

Patch Set 1 #

Patch Set 2 : minor fixes #

Patch Set 3 : fix tests #

Total comments: 18

Patch Set 4 : lots of changes #

Patch Set 5 : rebase on #463637 #

Total comments: 46

Patch Set 6 : engedy review #

Total comments: 4

Patch Set 7 : raymes review #

Total comments: 21

Patch Set 8 : jkarlin review #

Total comments: 1

Patch Set 9 : msramek review #

Patch Set 10 : remove problematic code #

Patch Set 11 : rebase #

Total comments: 6

Patch Set 12 : update histograms.xmkl #

Patch Set 13 : rebase on #468985 #

Total comments: 5

Patch Set 14 : msramek review #

Patch Set 15 : minor tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+594 lines, -58 lines) Patch
M chrome/browser/subresource_filter/chrome_subresource_filter_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/chrome_subresource_filter_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +25 lines, -36 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +88 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +66 lines, -3 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +136 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +222 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_profile_context.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_profile_context.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_profile_context_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -3 lines 0 comments Download
M components/content_settings/core/browser/website_settings_registry.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M components/content_settings/core/common/content_settings.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M components/content_settings/core/common/content_settings_types.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M components/subresource_filter/content/browser/subresource_filter_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 94 (65 generated)
Charlie Harrison
engedy: This is a strawman implementation for the smart ui. Have we ironed out the ...
3 years, 8 months ago (2017-04-03 21:17:21 UTC) #5
engedy
On 2017/04/03 21:17:21, Charlie Harrison wrote: > engedy: This is a strawman implementation for the ...
3 years, 8 months ago (2017-04-04 13:35:17 UTC) #14
engedy
Looking good, some initial comments. https://codereview.chromium.org/2795053002/diff/40001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2795053002/diff/40001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc#newcode29 chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:29: const int kUIShowThresholdHours = ...
3 years, 8 months ago (2017-04-04 13:36:00 UTC) #15
engedy
On 2017/04/04 13:35:17, engedy wrote: > On 2017/04/03 21:17:21, Charlie Harrison wrote: > > engedy: ...
3 years, 8 months ago (2017-04-04 18:09:13 UTC) #16
Charlie Harrison
engedy: Would you take another look? This is now heavily refactored (+ dependent on another ...
3 years, 8 months ago (2017-04-10 14:58:53 UTC) #19
engedy
LGTM % comments. Once those are addressed, I think this covers all the corner cases ...
3 years, 8 months ago (2017-04-12 14:02:51 UTC) #26
Charlie Harrison
Thanks engedy. msramek, would you PTAL at everything here? https://codereview.chromium.org/2795053002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2795053002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc#newcode23 chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:23: ...
3 years, 8 months ago (2017-04-12 17:53:45 UTC) #31
Charlie Harrison
jkarlin: PTAL as shadow
3 years, 8 months ago (2017-04-12 18:02:25 UTC) #33
raymes
Some drive-by nits. https://codereview.chromium.org/2795053002/diff/100001/components/content_settings/core/common/content_settings.cc File components/content_settings/core/common/content_settings.cc (right): https://codereview.chromium.org/2795053002/diff/100001/components/content_settings/core/common/content_settings.cc#newcode65 components/content_settings/core/common/content_settings.cc:65: CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER_DATA, Could you please omit this ...
3 years, 8 months ago (2017-04-12 22:35:15 UTC) #37
Charlie Harrison
Thanks raymes! https://codereview.chromium.org/2795053002/diff/100001/components/content_settings/core/common/content_settings.cc File components/content_settings/core/common/content_settings.cc (right): https://codereview.chromium.org/2795053002/diff/100001/components/content_settings/core/common/content_settings.cc#newcode65 components/content_settings/core/common/content_settings.cc:65: CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER_DATA, On 2017/04/12 22:35:15, raymes wrote: > ...
3 years, 8 months ago (2017-04-13 03:41:30 UTC) #38
jkarlin
lgtm (not a super close review) with a couple of comments https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc File chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc (right): ...
3 years, 8 months ago (2017-04-13 12:57:18 UTC) #39
engedy
https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h File chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h (right): https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h#newcode54 chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h:54: static const base::TimeDelta kDelayBeforeShowingInfobarAgain; On 2017/04/13 12:57:18, jkarlin wrote: ...
3 years, 8 months ago (2017-04-13 13:23:32 UTC) #40
jkarlin
https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h File chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h (right): https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h#newcode54 chrome/browser/subresource_filter/subresource_filter_content_settings_manager.h:54: static const base::TimeDelta kDelayBeforeShowingInfobarAgain; On 2017/04/13 13:23:32, engedy wrote: ...
3 years, 8 months ago (2017-04-13 14:02:33 UTC) #41
Charlie Harrison
thanks! https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc File chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc (right): https://codereview.chromium.org/2795053002/diff/120001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc#newcode81 chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc:81: ChromeSubresourceFilterClient::LogAction(kActionContentSettingsBlocked); On 2017/04/13 12:57:18, jkarlin wrote: > Is ...
3 years, 8 months ago (2017-04-13 14:13:10 UTC) #43
Charlie Harrison
To be clear, I've updated the current PS to not log the standard "Block" enum ...
3 years, 8 months ago (2017-04-13 14:13:50 UTC) #45
msramek
I left a first round of comments, but need to take a closer look yet ...
3 years, 8 months ago (2017-04-13 16:08:27 UTC) #48
msramek
s/take a closer look/talk to engedy@/ I was primarily confused about this: https://codereview.chromium.org/2795053002/diff/140001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc ...
3 years, 8 months ago (2017-04-13 16:48:32 UTC) #49
Charlie Harrison
The current PS doesn't change the troublesome content setting behavior, only responding to your first ...
3 years, 8 months ago (2017-04-13 17:54:01 UTC) #52
engedy
> For this patch, let's remove that behavior. engedy: does it sound good to you? ...
3 years, 8 months ago (2017-04-13 20:19:39 UTC) #55
Charlie Harrison
OK, PS 10 removes the problematic code that implicitly sets / clears content settings. This ...
3 years, 8 months ago (2017-04-13 21:39:34 UTC) #58
Charlie Harrison
raymes, msramek: Would you PTAL at this change now? For context: I spoke offline with ...
3 years, 8 months ago (2017-04-26 16:33:23 UTC) #66
Charlie Harrison
+isherman could you PTAL at histograms.xml?
3 years, 7 months ago (2017-05-02 20:27:49 UTC) #72
Ilya Sherman
histograms.xml lgtm
3 years, 7 months ago (2017-05-02 21:16:04 UTC) #73
msramek
LGTM with a few comments. Sorry again for the long wait :/ https://codereview.chromium.org/2795053002/diff/200001/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc File chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc ...
3 years, 7 months ago (2017-05-08 16:40:26 UTC) #78
Charlie Harrison
Many thanks for the review msramek. raymes: Since this is blocking a bunch of work ...
3 years, 7 months ago (2017-05-08 20:57:21 UTC) #81
raymes
> raymes: Since this is blocking a bunch of work I'm going to go ahead ...
3 years, 7 months ago (2017-05-08 22:38:38 UTC) #87
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/438754) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
3 years, 7 months ago (2017-05-09 00:44:13 UTC) #89
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/2795053002/280001
3 years, 7 months ago (2017-05-09 01:01:41 UTC) #91
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 04:42:11 UTC) #94
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/3f8cdfd3ab1a3e87f90c37f3d776...

Powered by Google App Engine
This is Rietveld 408576698