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

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed)

Created:
7 years ago by nyquist
Modified:
6 years, 11 months ago
CC:
chromium-reviews, browser-components-watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, markusheintz_
Visibility:
Public.

Description

Add the scheme chrome-distiller:// and hook up data source. This adds the scheme chrome-distiller:// and has a minimal implementation of a data source which should be loaded when a URL with the new scheme is loaded. The chrome-distiller:// scheme will be used for displaying distilled articles, which is extracted content of web pages with long form articles. Chrome will maintain a list of such articles, and in addition, the user will be able to display such distilled content on demand for a given URL. BUG=319881 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247187

Patch Set 1 #

Patch Set 2 : Simplified WebUI bit by removing distillation. #

Patch Set 3 : Changed to use onReceived for javascript #

Total comments: 1

Patch Set 4 : Rebased #

Patch Set 5 : Removed unnecessary dependency on DomDistillerService #

Total comments: 1

Patch Set 6 : Rebased #

Total comments: 5

Patch Set 7 : Implement as data source instead. Also rebased across thousands of CLs. #

Total comments: 14

Patch Set 8 : Rebased #

Patch Set 9 : Moved more things away from //content and added security CHECK for WebUI bindings #

Patch Set 10 : Addressed the rest of the comments from nasko@ #

Patch Set 11 : Added browser test #

Patch Set 12 : Add more verification that the scheme is correctly registered and loading page works. #

Total comments: 7

Patch Set 13 : Added TODO for removing source registration in test #

Patch Set 14 : Removed scheme from //content and simplified URLDataSource. #

Patch Set 15 : Fixed const for mac build #

Total comments: 1

Patch Set 16 : Addressed comment from bengr #

Total comments: 4

Patch Set 17 : Addressed comments from jam@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -43 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/dom_distiller/dom_distiller_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +110 lines, -0 lines 0 comments Download
M chrome/browser/history/history_service.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_content_client.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/url_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/url_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -3 lines 0 comments Download
M components/dom_distiller.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A + components/dom_distiller/content/dom_distiller_viewer_source.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -13 lines 0 comments Download
A components/dom_distiller/content/dom_distiller_viewer_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +52 lines, -0 lines 0 comments Download
M components/dom_distiller/webui/dom_distiller_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/browser_url_handler_impl.cc 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 content/browser/webui/url_data_manager_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/webui/url_data_manager_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +33 lines, -18 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 30 (0 generated)
nyquist
thakis: PTAL for overview Patch set 1 is the "mechanical move" of a CL that ...
7 years ago (2013-12-04 23:53:35 UTC) #1
nyquist
https://codereview.chromium.org/105723002/diff/40001/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc File chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc (right): https://codereview.chromium.org/105723002/diff/40001/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc#newcode220 chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc:220: return new dom_distiller::DomDistillerViewerUi(web_ui, service); I think this can be ...
7 years ago (2013-12-04 23:56:55 UTC) #2
Nico
lgtm. Maybe the CL description could describe a bit more what this is. Since this ...
7 years ago (2013-12-05 00:22:38 UTC) #3
abarth-chromium
It's not clear to me why this feature needs a new scheme. Please have someone ...
7 years ago (2013-12-05 04:33:44 UTC) #4
Nico
On Wed, Dec 4, 2013 at 8:33 PM, <abarth@chromium.org> wrote: > It's not clear to ...
7 years ago (2013-12-05 04:34:58 UTC) #5
abarth-chromium
On 2013/12/05 04:34:58, Nico wrote: > Can you suggest someone? I added you for this, ...
7 years ago (2013-12-05 04:40:01 UTC) #6
Nico
On Wed, Dec 4, 2013 at 8:40 PM, <abarth@chromium.org> wrote: > On 2013/12/05 04:34:58, Nico ...
7 years ago (2013-12-05 04:41:02 UTC) #7
Nico
tsepez, this adds a new scheme. Can you do a security review?
7 years ago (2013-12-05 04:41:37 UTC) #8
nasko
A drive-by comment. https://codereview.chromium.org/105723002/diff/70001/components/dom_distiller/webui/dom_distiller_viewer_ui.cc File components/dom_distiller/webui/dom_distiller_viewer_ui.cc (right): https://codereview.chromium.org/105723002/diff/70001/components/dom_distiller/webui/dom_distiller_viewer_ui.cc#newcode22 components/dom_distiller/webui/dom_distiller_viewer_ui.cc:22: GURL url = web_contents->GetVisibleURL(); This should ...
7 years ago (2013-12-05 16:59:27 UTC) #9
Tom Sepez
https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc File components/dom_distiller/webui/dom_distiller_handler.cc (right): https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc#newcode57 components/dom_distiller/webui/dom_distiller_handler.cc:57: web_ui()->GetWebContents()->GetController().LoadURL(url, @creis - would this load into the same ...
7 years ago (2013-12-05 19:25:52 UTC) #10
Charlie Reis
https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc File components/dom_distiller/webui/dom_distiller_handler.cc (right): https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc#newcode57 components/dom_distiller/webui/dom_distiller_handler.cc:57: web_ui()->GetWebContents()->GetController().LoadURL(url, On 2013/12/05 19:25:52, Tom Sepez wrote: > @creis ...
7 years ago (2013-12-06 22:09:31 UTC) #11
nyquist
https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc File components/dom_distiller/webui/dom_distiller_handler.cc (right): https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc#newcode57 components/dom_distiller/webui/dom_distiller_handler.cc:57: web_ui()->GetWebContents()->GetController().LoadURL(url, On 2013/12/06 22:09:32, creis wrote: > On 2013/12/05 ...
7 years ago (2013-12-06 22:25:43 UTC) #12
Charlie Reis
https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc File components/dom_distiller/webui/dom_distiller_handler.cc (right): https://codereview.chromium.org/105723002/diff/90001/components/dom_distiller/webui/dom_distiller_handler.cc#newcode57 components/dom_distiller/webui/dom_distiller_handler.cc:57: web_ui()->GetWebContents()->GetController().LoadURL(url, On 2013/12/06 22:25:44, nyquist wrote: > On 2013/12/06 ...
7 years ago (2013-12-06 22:33:02 UTC) #13
nyquist
tsepez, creis: PTAL. Now implemented as data source instead of normal WebUI. Sorry for the ...
6 years, 11 months ago (2014-01-08 02:00:40 UTC) #14
Tom Sepez
Thanks for taking the time to do it this way. I believe this is correct. ...
6 years, 11 months ago (2014-01-09 00:56:10 UTC) #15
nasko
I haven't followed the changes in this CL, so looking only at the latest patchset ...
6 years, 11 months ago (2014-01-16 23:39:11 UTC) #16
nyquist
Addressed all comments until now. Still looking into: 1) Writing a browsertest 2) Removing the ...
6 years, 11 months ago (2014-01-22 00:47:57 UTC) #17
nyquist
nasko: PTAL. Only missing part is removing the last few bits from //content.
6 years, 11 months ago (2014-01-22 20:06:56 UTC) #18
nasko
Just a couple of comments. Once we find how to remove the last bits from ...
6 years, 11 months ago (2014-01-23 16:37:03 UTC) #19
nyquist
jam: PTAL nasko: PTAL Changes since patch set 12: - Made code for working with ...
6 years, 11 months ago (2014-01-24 03:03:07 UTC) #20
nasko
Thanks for persisting through all of my comments. This looks much better! LGTM
6 years, 11 months ago (2014-01-24 17:04:56 UTC) #21
bengr
https://codereview.chromium.org/105723002/diff/1010001/content/browser/browser_url_handler_impl.cc File content/browser/browser_url_handler_impl.cc (right): https://codereview.chromium.org/105723002/diff/1010001/content/browser/browser_url_handler_impl.cc#newcode46 content/browser/browser_url_handler_impl.cc:46: for (std::vector<std::string>::const_iterator it = for (size_t i = 0; ...
6 years, 11 months ago (2014-01-24 17:10:39 UTC) #22
jam
content lgtm with these changes, thanks https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode45 components/dom_distiller/content/dom_distiller_viewer_source.cc:45: const { On ...
6 years, 11 months ago (2014-01-24 22:07:54 UTC) #23
Nico
https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode45 components/dom_distiller/content/dom_distiller_viewer_source.cc:45: const { On 2014/01/24 22:07:54, jam wrote: > On ...
6 years, 11 months ago (2014-01-24 22:16:34 UTC) #24
jam
https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/105723002/diff/500001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode45 components/dom_distiller/content/dom_distiller_viewer_source.cc:45: const { On 2014/01/24 22:16:35, Nico wrote: > On ...
6 years, 11 months ago (2014-01-24 22:29:24 UTC) #25
nyquist
https://codereview.chromium.org/105723002/diff/1290001/components/dom_distiller/webui/dom_distiller_handler.cc File components/dom_distiller/webui/dom_distiller_handler.cc (right): https://codereview.chromium.org/105723002/diff/1290001/components/dom_distiller/webui/dom_distiller_handler.cc#newcode60 components/dom_distiller/webui/dom_distiller_handler.cc:60: content::Referrer(), content::PAGE_TRANSITION_GENERATED, On 2014/01/24 22:07:55, jam wrote: > nit: ...
6 years, 11 months ago (2014-01-25 00:40:38 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/105723002/1420001
6 years, 11 months ago (2014-01-27 00:24:24 UTC) #27
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) telemetry_perf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=251991
6 years, 11 months ago (2014-01-27 01:53:53 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/105723002/1420001
6 years, 11 months ago (2014-01-27 02:08:01 UTC) #29
commit-bot: I haz the power
6 years, 11 months ago (2014-01-27 02:59:49 UTC) #30
Message was sent while issue was closed.
Change committed as 247187

Powered by Google App Engine
This is Rietveld 408576698