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

Issue 2260783002: Make GetDismissedSuggestionsForDebugging asynchronous (Closed)

Created:
4 years, 4 months ago by Philipp Keck
Modified:
4 years, 4 months ago
CC:
chromium-reviews, arv+watch_chromium.org, ntp-dev+reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make GetDismissedSuggestionsForDebugging asynchronous Use callback instead of return value for GetDismissedSuggestionsForDebugging in ContentSuggestionsProvider and ContentSuggestionsService. Change the implementations of all providers accordingly. Change the SnippetsInternals to fetch the dismissed suggestions asynchronously only if the corresponding UI is visible. Adjust unit tests. Change the implementation in OfflinePageSuggestionsProvider to return the actual suggestions instead of dummies. BUG=628198 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/de0dd9f4b9a81eb0f168fbf1311a6b315f092b68 Cr-Commit-Position: refs/heads/master@{#413699}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Marc's comments #

Total comments: 9

Patch Set 3 : Marc's new comments #

Patch Set 4 : Replace function pointer, use multiple if-continue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -75 lines) Patch
M chrome/browser/resources/snippets_internals.html View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/snippets_internals.js View 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.h View 1 2 5 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 2 7 chunks +64 lines, -5 lines 0 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M components/ntp_snippets/content_suggestions_provider.h View 1 2 2 chunks +7 lines, -3 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.h View 1 2 2 chunks +7 lines, -3 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service.cc View 1 2 1 chunk +7 lines, -6 lines 0 comments Download
M components/ntp_snippets/content_suggestions_service_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service_unittest.cc View 1 2 2 chunks +39 lines, -9 lines 0 comments Download
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h View 2 chunks +7 lines, -2 lines 0 comments Download
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc View 1 2 3 5 chunks +40 lines, -26 lines 0 comments Download
M components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 30 (12 generated)
Philipp Keck
PTAL
4 years, 4 months ago (2016-08-19 09:20:20 UTC) #3
Marc Treib
https://codereview.chromium.org/2260783002/diff/1/chrome/browser/ui/webui/snippets_internals_message_handler.cc File chrome/browser/ui/webui/snippets_internals_message_handler.cc (right): https://codereview.chromium.org/2260783002/diff/1/chrome/browser/ui/webui/snippets_internals_message_handler.cc#newcode153 chrome/browser/ui/webui/snippets_internals_message_handler.cc:153: for (auto& it : dismissed_state_) { Please use the ...
4 years, 4 months ago (2016-08-19 10:07:51 UTC) #4
Philipp Keck
https://codereview.chromium.org/2260783002/diff/1/chrome/browser/ui/webui/snippets_internals_message_handler.cc File chrome/browser/ui/webui/snippets_internals_message_handler.cc (right): https://codereview.chromium.org/2260783002/diff/1/chrome/browser/ui/webui/snippets_internals_message_handler.cc#newcode153 chrome/browser/ui/webui/snippets_internals_message_handler.cc:153: for (auto& it : dismissed_state_) { On 2016/08/19 10:07:51, ...
4 years, 4 months ago (2016-08-19 12:11:54 UTC) #5
Marc Treib
https://codereview.chromium.org/2260783002/diff/1/components/ntp_snippets/content_suggestions_provider.h File components/ntp_snippets/content_suggestions_provider.h (right): https://codereview.chromium.org/2260783002/diff/1/components/ntp_snippets/content_suggestions_provider.h#newcode34 components/ntp_snippets/content_suggestions_provider.h:34: Category category, On 2016/08/19 12:11:53, Philipp Keck wrote: > ...
4 years, 4 months ago (2016-08-19 12:36:15 UTC) #6
Philipp Keck
https://codereview.chromium.org/2260783002/diff/1/components/ntp_snippets/content_suggestions_provider.h File components/ntp_snippets/content_suggestions_provider.h (right): https://codereview.chromium.org/2260783002/diff/1/components/ntp_snippets/content_suggestions_provider.h#newcode34 components/ntp_snippets/content_suggestions_provider.h:34: Category category, On 2016/08/19 12:36:14, Marc Treib wrote: > ...
4 years, 4 months ago (2016-08-19 14:20:40 UTC) #7
Philipp Keck
bauerb@chromium.org: Please review changes in chrome/browser/*
4 years, 4 months ago (2016-08-19 14:28:36 UTC) #9
Marc Treib
LGTM with the one remaining comment https://codereview.chromium.org/2260783002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc (right): https://codereview.chromium.org/2260783002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode267 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:267: (category == recent_tabs_category_) ...
4 years, 4 months ago (2016-08-19 15:18:31 UTC) #10
Bernhard Bauer
chrome/browser/LGTM, but I agree with Marc's comment about the function pointer. https://codereview.chromium.org/2260783002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc (right): ...
4 years, 4 months ago (2016-08-19 16:22:38 UTC) #11
Philipp Keck
https://codereview.chromium.org/2260783002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc (right): https://codereview.chromium.org/2260783002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc#newcode267 components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc:267: (category == recent_tabs_category_) ? &IsRecentTab : &IsDownload; On 2016/08/19 ...
4 years, 4 months ago (2016-08-19 16:52:36 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/2260783002/60001
4 years, 4 months ago (2016-08-19 16:54:12 UTC) #15
commit-bot: I haz the power
Exceeded global retry quota
4 years, 4 months ago (2016-08-19 18:30:30 UTC) #17
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/2260783002/60001
4 years, 4 months ago (2016-08-22 06:28:17 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/265820)
4 years, 4 months ago (2016-08-22 08:54:44 UTC) #21
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/2260783002/60001
4 years, 4 months ago (2016-08-22 08:58:02 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/265837)
4 years, 4 months ago (2016-08-22 11:25:09 UTC) #25
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/2260783002/60001
4 years, 4 months ago (2016-08-23 07:32:10 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-23 09:18:28 UTC) #28
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 09:20:38 UTC) #30
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/de0dd9f4b9a81eb0f168fbf1311a6b315f092b68
Cr-Commit-Position: refs/heads/master@{#413699}

Powered by Google App Engine
This is Rietveld 408576698