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

Issue 2407713002: Limit PDF helper extension to print preview only (Closed)

Created:
4 years, 2 months ago by robwu
Modified:
4 years, 2 months ago
Reviewers:
Lei Zhang, raymes, *nasko
CC:
chromium-reviews, arv+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Limit PDF helper extension to print preview only These days, the helper extension is only used by the print preview. So make sure that the helper extension is only activated in print previews and fall back to the standard MimeHandler otherwise. When the helper extension is unexpectedly loaded directly instead of through the mime handler, the extension will fail to initialize. This is totally desired! BUG=654280 TEST=See bug report, also confirmed that print preview still works. R=thestig@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/c72f59f36a16c0cb64e0eebfc0999a09250740f0 Cr-Commit-Position: refs/heads/master@{#425280}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add test #

Total comments: 4

Patch Set 3 : Nits + fix compilation failure on macOS #

Total comments: 9

Patch Set 4 : Use location.origin instead of location.ancestorOrigins. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -67 lines) Patch
M chrome/browser/pdf/pdf_extension_test.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/resources/pdf/browser_api.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 chunks +32 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 chunks +29 lines, -0 lines 0 comments Download
M content/public/test/content_browser_test_utils.h View 1 2 3 chunks +1 line, -33 lines 0 comments Download
M content/public/test/content_browser_test_utils.cc View 1 2 chunks +0 lines, -30 lines 0 comments Download

Messages

Total messages: 46 (26 generated)
robwu
4 years, 2 months ago (2016-10-09 17:11:54 UTC) #6
Lei Zhang
I defer to raymes on this one.
4 years, 2 months ago (2016-10-10 21:15:42 UTC) #8
raymes
Thanks for this! This lg but I think we should also prevent any redirects occurring ...
4 years, 2 months ago (2016-10-11 06:24:44 UTC) #9
robwu
+Mustafa for review of content/public/test. I moved ConsoleObserverDelegate to browser_test_utils so I can use it ...
4 years, 2 months ago (2016-10-11 21:05:38 UTC) #11
robwu
-meacer +nasko Nasko, can you review the mechanical move in content/public/test? See my previous message. ...
4 years, 2 months ago (2016-10-11 21:09:40 UTC) #15
nasko
content/ LGTM and a couple of nits. https://codereview.chromium.org/2407713002/diff/20001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2407713002/diff/20001/chrome/browser/pdf/pdf_extension_test.cc#newcode467 chrome/browser/pdf/pdf_extension_test.cc:467: // Ensure ...
4 years, 2 months ago (2016-10-11 21:26:33 UTC) #19
robwu
https://codereview.chromium.org/2407713002/diff/20001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2407713002/diff/20001/chrome/browser/pdf/pdf_extension_test.cc#newcode467 chrome/browser/pdf/pdf_extension_test.cc:467: // Ensure that the PDF component extension cannot directly ...
4 years, 2 months ago (2016-10-11 22:15:46 UTC) #21
raymes
On 2016/10/11 21:05:38, robwu wrote: > +Mustafa for review of content/public/test. > I moved ConsoleObserverDelegate ...
4 years, 2 months ago (2016-10-11 23:32:34 UTC) #26
robwu
On 2016/10/11 23:32:34, raymes wrote: > Actually I think the root cause of both bugs ...
4 years, 2 months ago (2016-10-11 23:40:03 UTC) #27
raymes
On 2016/10/11 23:40:03, robwu wrote: > On 2016/10/11 23:32:34, raymes wrote: > > Actually I ...
4 years, 2 months ago (2016-10-11 23:50:29 UTC) #28
robwu
On 2016/10/11 23:50:29, raymes wrote: > On 2016/10/11 23:40:03, robwu wrote: > > On 2016/10/11 ...
4 years, 2 months ago (2016-10-11 23:57:28 UTC) #29
raymes
On 2016/10/11 23:57:28, robwu wrote: > On 2016/10/11 23:50:29, raymes wrote: > > On 2016/10/11 ...
4 years, 2 months ago (2016-10-11 23:59:58 UTC) #30
raymes
https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc#newcode481 chrome/browser/pdf/pdf_extension_test.cc:481: console_delegate->Wait(); It could be good to verify that the ...
4 years, 2 months ago (2016-10-12 02:08:52 UTC) #32
robwu
https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc#newcode481 chrome/browser/pdf/pdf_extension_test.cc:481: console_delegate->Wait(); On 2016/10/12 02:08:52, raymes wrote: > It could ...
4 years, 2 months ago (2016-10-12 11:33:28 UTC) #33
raymes
Thanks! https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc#newcode481 chrome/browser/pdf/pdf_extension_test.cc:481: console_delegate->Wait(); On 2016/10/12 11:33:28, robwu wrote: > On ...
4 years, 2 months ago (2016-10-13 00:43:22 UTC) #34
robwu
https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2407713002/diff/40001/chrome/browser/resources/pdf/browser_api.js#newcode151 chrome/browser/resources/pdf/browser_api.js:151: function createBrowserApiForMimeHandlerView() { On 2016/10/13 00:43:22, raymes wrote: > ...
4 years, 2 months ago (2016-10-13 23:29:30 UTC) #35
raymes
lgtm
4 years, 2 months ago (2016-10-13 23:36:01 UTC) #38
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/2407713002/60001
4 years, 2 months ago (2016-10-14 09:28:39 UTC) #43
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-14 09:35:41 UTC) #44
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 09:38:34 UTC) #46
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c72f59f36a16c0cb64e0eebfc0999a09250740f0
Cr-Commit-Position: refs/heads/master@{#425280}

Powered by Google App Engine
This is Rietveld 408576698