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

Issue 2335023002: Adding a previews IO-thread blacklist (Closed)

Created:
4 years, 3 months ago by RyanSturm
Modified:
4 years, 2 months ago
Reviewers:
mmenke, tbansal1
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding a previews IO-thread blacklist This introduces an in memory blacklist for previews. This also introduces an interface for retrieiving prior sessions information from a store. The blacklist is keyed on fully qualified domain name and will blacklist domains based on user history of opt-outs on those domains. This does not yet implement adding preview navigations to the blacklist or using the blacklist to determine site navigation eligibility. Nor does this CL implement the backing store. BUG=639087 Committed: https://crrev.com/d0b4726daad2e6f410df05299bc5d37c23aa339c Cr-Commit-Position: refs/heads/master@{#420726}

Patch Set 1 #

Patch Set 2 : missing file #

Patch Set 3 : unittests #

Patch Set 4 : RunLoop #

Patch Set 5 : updated comments #

Total comments: 12

Patch Set 6 : tbansal comments #

Total comments: 42

Patch Set 7 : tbansal comments #

Patch Set 8 : build.gn dependency on gurl #

Total comments: 12

Patch Set 9 : tbansal comments #

Total comments: 16

Patch Set 10 : tbansal comments #

Patch Set 11 : tbansal comments #

Total comments: 34

Patch Set 12 : Adding host limit and addressing comments #

Patch Set 13 : big rebase #

Patch Set 14 : typo in include #

Patch Set 15 : another typo #

Total comments: 34

Patch Set 16 : tbansal comments #

Total comments: 50

Patch Set 17 : tbansal comments #

Total comments: 20

Patch Set 18 : rebase #

Patch Set 19 : tbansal comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+975 lines, -35 lines) Patch
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M components/previews/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +9 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +115 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +150 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list_item.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +80 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +60 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list_item_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +89 lines, -0 lines 0 comments Download
A components/previews/core/previews_black_list_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +262 lines, -0 lines 0 comments Download
M components/previews/core/previews_experiments.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +20 lines, -0 lines 0 comments Download
M components/previews/core/previews_experiments.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +75 lines, -11 lines 0 comments Download
M components/previews/core/previews_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -3 lines 0 comments Download
M components/previews/core/previews_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +18 lines, -5 lines 0 comments Download
M components/previews/core/previews_io_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -6 lines 0 comments Download
A components/previews/core/previews_opt_out_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +58 lines, -0 lines 0 comments Download
M components/previews/core/previews_ui_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -2 lines 0 comments Download
M components/previews/core/previews_ui_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -2 lines 0 comments Download
M components/previews/core/previews_ui_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -5 lines 0 comments Download

Messages

Total messages: 107 (84 generated)
RyanSturm
tbansal: PTAL @ *, It's pretty large, but the only way I see to split ...
4 years, 3 months ago (2016-09-13 23:30:31 UTC) #16
tbansal1
https://codereview.chromium.org/2335023002/diff/80001/components/previews/previews_black_list.cc File components/previews/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/80001/components/previews/previews_black_list.cc#newcode69 components/previews/previews_black_list.cc:69: void PreviewsBlackList::ClearBlackList(const base::Time& begin_time, Can this be done in ...
4 years, 3 months ago (2016-09-13 23:52:45 UTC) #17
RyanSturm
tbansal: PTAL @ *, I removed clear black list and ui-thread functionality to save some ...
4 years, 3 months ago (2016-09-14 16:44:30 UTC) #26
tbansal1
https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.cc File components/previews/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.cc#newcode34 components/previews/previews_black_list.cc:34: DCHECK(thread_checker_.CalledOnValidThread()); Thread checker is typically the first check. https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.cc#newcode42 ...
4 years, 3 months ago (2016-09-14 17:00:03 UTC) #27
tbansal1
more comments. https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list_item.cc File components/previews/previews_black_list_item.cc (right): https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list_item.cc#newcode9 components/previews/previews_black_list_item.cc:9: #include "base/time/time.h" No need to include here ...
4 years, 3 months ago (2016-09-14 17:17:31 UTC) #28
RyanSturm
tbansal: PTAL @ * https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.cc File components/previews/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.cc#newcode34 components/previews/previews_black_list.cc:34: DCHECK(thread_checker_.CalledOnValidThread()); On 2016/09/14 17:00:03, tbansal1 ...
4 years, 3 months ago (2016-09-14 18:36:44 UTC) #39
tbansal1
https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.h File components/previews/previews_black_list.h (right): https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.h#newcode55 components/previews/previews_black_list.h:55: bool IsLoadedAndAllowed(const std::string& host_name); On 2016/09/14 18:36:42, Ryan Sturm ...
4 years, 3 months ago (2016-09-14 20:17:51 UTC) #44
RyanSturm
tbansal: ptal @ * https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.h File components/previews/previews_black_list.h (right): https://codereview.chromium.org/2335023002/diff/120001/components/previews/previews_black_list.h#newcode55 components/previews/previews_black_list.h:55: bool IsLoadedAndAllowed(const std::string& host_name); On ...
4 years, 3 months ago (2016-09-14 21:01:04 UTC) #49
tbansal1
https://codereview.chromium.org/2335023002/diff/180001/components/previews/previews_black_list.h File components/previews/previews_black_list.h (right): https://codereview.chromium.org/2335023002/diff/180001/components/previews/previews_black_list.h#newcode47 components/previews/previews_black_list.h:47: typedef base::Closure QueueClosure; Why are these typedefs public? https://codereview.chromium.org/2335023002/diff/180001/components/previews/previews_experiments.cc ...
4 years, 3 months ago (2016-09-14 21:36:26 UTC) #52
RyanSturm
tbansal: PTAL https://codereview.chromium.org/2335023002/diff/180001/components/previews/previews_black_list.h File components/previews/previews_black_list.h (right): https://codereview.chromium.org/2335023002/diff/180001/components/previews/previews_black_list.h#newcode47 components/previews/previews_black_list.h:47: typedef base::Closure QueueClosure; On 2016/09/14 21:36:26, tbansal1 ...
4 years, 3 months ago (2016-09-14 22:41:26 UTC) #56
tbansal1
https://codereview.chromium.org/2335023002/diff/220001/components/previews/previews_black_list.cc File components/previews/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/220001/components/previews/previews_black_list.cc#newcode51 components/previews/previews_black_list.cc:51: DCHECK(url.has_host()); DCHECK(loaded_); https://codereview.chromium.org/2335023002/diff/220001/components/previews/previews_black_list.cc#newcode83 components/previews/previews_black_list.cc:83: while (pending_callbacks_.size() > 0 && ...
4 years, 3 months ago (2016-09-15 16:34:25 UTC) #60
RyanSturm
tbansal: PTAL https://codereview.chromium.org/2335023002/diff/220001/components/previews/previews_black_list.cc File components/previews/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/220001/components/previews/previews_black_list.cc#newcode51 components/previews/previews_black_list.cc:51: DCHECK(url.has_host()); On 2016/09/15 16:34:24, tbansal1 wrote: > ...
4 years, 3 months ago (2016-09-19 18:07:25 UTC) #70
tbansal1
https://codereview.chromium.org/2335023002/diff/300001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/300001/components/previews/core/previews_black_list.cc#newcode26 components/previews/core/previews_black_list.cc:26: &PreviewsBlackList::LoadBlackListDone, weak_factory_.GetWeakPtr())); Since opt_out_store_ is owned by |this|, is ...
4 years, 3 months ago (2016-09-19 21:26:09 UTC) #76
RyanSturm
tbansal: PTAL https://codereview.chromium.org/2335023002/diff/300001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/300001/components/previews/core/previews_black_list.cc#newcode26 components/previews/core/previews_black_list.cc:26: &PreviewsBlackList::LoadBlackListDone, weak_factory_.GetWeakPtr())); On 2016/09/19 21:26:07, tbansal1 wrote: ...
4 years, 3 months ago (2016-09-19 22:37:46 UTC) #78
tbansal1
almost there. https://codereview.chromium.org/2335023002/diff/320001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/320001/components/previews/core/previews_black_list.cc#newcode66 components/previews/core/previews_black_list.cc:66: bool PreviewsBlackList::IsLoadedAndAllowed(const GURL& url, PreviewsType type) { ...
4 years, 3 months ago (2016-09-20 17:48:52 UTC) #82
RyanSturm
tbansal: PTAL https://codereview.chromium.org/2335023002/diff/320001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/320001/components/previews/core/previews_black_list.cc#newcode66 components/previews/core/previews_black_list.cc:66: bool PreviewsBlackList::IsLoadedAndAllowed(const GURL& url, PreviewsType type) { ...
4 years, 3 months ago (2016-09-20 18:38:18 UTC) #85
tbansal1
lgtm % nits. https://codereview.chromium.org/2335023002/diff/330001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/330001/components/previews/core/previews_black_list.cc#newcode75 components/previews/core/previews_black_list.cc:75: std::string host_name = url.host(); nit: you ...
4 years, 2 months ago (2016-09-22 21:12:28 UTC) #92
RyanSturm
https://codereview.chromium.org/2335023002/diff/330001/components/previews/core/previews_black_list.cc File components/previews/core/previews_black_list.cc (right): https://codereview.chromium.org/2335023002/diff/330001/components/previews/core/previews_black_list.cc#newcode75 components/previews/core/previews_black_list.cc:75: std::string host_name = url.host(); On 2016/09/22 21:12:27, tbansal1 wrote: ...
4 years, 2 months ago (2016-09-23 17:23:25 UTC) #94
RyanSturm
mmenke: PTAL @ chrome/browser/profiles/profile_impl_io_data.cc As a note, In a future CL I will change PreviewsService::set_previews_ui_service ...
4 years, 2 months ago (2016-09-23 17:27:42 UTC) #97
mmenke
On 2016/09/23 17:27:42, Ryan Sturm wrote: > mmenke: PTAL @ chrome/browser/profiles/profile_impl_io_data.cc > > As a ...
4 years, 2 months ago (2016-09-23 18:26:51 UTC) #98
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/2335023002/370001
4 years, 2 months ago (2016-09-23 19:22:27 UTC) #103
commit-bot: I haz the power
Committed patchset #19 (id:370001)
4 years, 2 months ago (2016-09-23 21:04:58 UTC) #105
commit-bot: I haz the power
4 years, 2 months ago (2016-09-23 21:08:03 UTC) #107
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/d0b4726daad2e6f410df05299bc5d37c23aa339c
Cr-Commit-Position: refs/heads/master@{#420726}

Powered by Google App Engine
This is Rietveld 408576698