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

Issue 953793003: Ensuring interception of stream get determined by plugin path before checking mime type. (Closed)

Created:
5 years, 10 months ago by Deepak
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensuring interception of stream get determined by plugin path before checking mime type. Earlier we are checking whether a extension with url that have mime type should be intercepted as stream by checking plugin availablity. Now we are passing plugin path and then checking whether their is MimehandlerView Plugin available with that path and then we are allowing intercepted as stream. So now interception is not depends upon mimetype. BUG=443466 Committed: https://crrev.com/d7d1167121bfe4b80d2cdf7559171aeff25c02c6 Cr-Commit-Position: refs/heads/master@{#324187}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Changes as per review comments. #

Total comments: 9

Patch Set 3 : Changes as per review comments #

Patch Set 4 : Added Test Case. #

Patch Set 5 : Adding Test Case. #

Total comments: 10

Patch Set 6 : Changing Test Cases. #

Total comments: 10

Patch Set 7 : Changes as per review comments. #

Patch Set 8 : Fixing Build error. #

Patch Set 9 : #

Total comments: 29

Patch Set 10 : Changes as per review comments. #

Patch Set 11 : Resolving Build Errors. #

Total comments: 13

Patch Set 12 : Changed as per review comments. #

Patch Set 13 : Changes as per review comments. #

Total comments: 8

Patch Set 14 : Changes as per review comments. #

Total comments: 15

Patch Set 15 : Addressing nits. #

Total comments: 4

Patch Set 16 : Addressing nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -107 lines) Patch
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +18 lines, -43 lines 0 comments Download
M content/browser/loader/buffered_resource_handler.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/loader/buffered_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +64 lines, -45 lines 0 comments Download
M content/browser/loader/buffered_resource_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +94 lines, -6 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -8 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 2 chunks +7 lines, -4 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 65 (9 generated)
Deepak
PTAL
5 years, 10 months ago (2015-02-25 04:52:03 UTC) #2
Deepak
+ mmenke@chromium.org for content/browser/loader/* + scottmg@chromium.org for resource_dispatcher_host_delegate.cc/h PTAL
5 years, 9 months ago (2015-03-02 05:51:58 UTC) #4
raymes
Hey Deepak. Thanks for taking a look, I will get to this tomorrow or Wednesday. ...
5 years, 9 months ago (2015-03-02 06:10:00 UTC) #6
Deepak
On 2015/03/02 06:10:00, raymes wrote: > Hey Deepak. Thanks for taking a look, I will ...
5 years, 9 months ago (2015-03-02 06:12:31 UTC) #7
scottmg
i'm not owners anyway, removing myself.
5 years, 9 months ago (2015-03-02 17:39:14 UTC) #8
mmenke
Not a review, but this says it fixes something, but there are no tests... Can ...
5 years, 9 months ago (2015-03-03 18:38:00 UTC) #9
Deepak
On 2015/03/03 18:38:00, mmenke wrote: > Not a review, but this says it fixes something, ...
5 years, 9 months ago (2015-03-04 06:55:37 UTC) #10
Deepak
PTAL Thanks.
5 years, 9 months ago (2015-03-05 12:53:21 UTC) #11
Deepak
PTAL please. Thanks.
5 years, 9 months ago (2015-03-09 07:21:24 UTC) #12
Deepak
PTAL Thanks.
5 years, 9 months ago (2015-03-11 08:16:27 UTC) #13
mmenke
On 2015/03/11 08:16:27, Deepak wrote: > PTAL > Thanks. It's generally best to be clear ...
5 years, 9 months ago (2015-03-11 14:31:26 UTC) #14
Deepak
On 2015/03/11 14:31:26, mmenke wrote: > On 2015/03/11 08:16:27, Deepak wrote: > > PTAL > ...
5 years, 9 months ago (2015-03-12 02:41:06 UTC) #15
raymes
https://codereview.chromium.org/953793003/diff/1/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/953793003/diff/1/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode601 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:601: const base::FilePath& file_path, plugin_path https://codereview.chromium.org/953793003/diff/1/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode616 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:616: content::PluginServiceFilter* filter = ...
5 years, 9 months ago (2015-03-12 05:21:04 UTC) #16
Deepak
@Raymes, Thanks for review. Changes done as suggested. PTAL. https://codereview.chromium.org/953793003/diff/1/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/1/content/browser/loader/buffered_resource_handler_unittest.cc#newcode102 content/browser/loader/buffered_resource_handler_unittest.cc:102: ...
5 years, 9 months ago (2015-03-12 12:33:18 UTC) #17
Deepak
@Raymes, Thanks for review. Changes done as suggested. PTAL.
5 years, 9 months ago (2015-03-13 15:35:45 UTC) #18
raymes
https://codereview.chromium.org/953793003/diff/20001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/953793003/diff/20001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode612 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:612: nit: don't need a newline https://codereview.chromium.org/953793003/diff/20001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode627 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:627: if (plugin_path ...
5 years, 9 months ago (2015-03-16 05:36:50 UTC) #19
Deepak
@Raymes Thanks for review. Changes done as suggested. PTAL https://codereview.chromium.org/953793003/diff/20001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/953793003/diff/20001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode612 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:612: ...
5 years, 9 months ago (2015-03-16 10:17:33 UTC) #20
raymes
https://codereview.chromium.org/953793003/diff/20001/content/browser/loader/buffered_resource_handler.cc File content/browser/loader/buffered_resource_handler.cc (right): https://codereview.chromium.org/953793003/diff/20001/content/browser/loader/buffered_resource_handler.cc#newcode317 content/browser/loader/buffered_resource_handler.cc:317: if (plugin.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) { Can we add a ...
5 years, 9 months ago (2015-03-18 03:45:52 UTC) #21
Deepak
On 2015/03/18 03:45:52, raymes wrote: > https://codereview.chromium.org/953793003/diff/20001/content/browser/loader/buffered_resource_handler.cc > File content/browser/loader/buffered_resource_handler.cc (right): > > https://codereview.chromium.org/953793003/diff/20001/content/browser/loader/buffered_resource_handler.cc#newcode317 > ...
5 years, 9 months ago (2015-03-18 09:52:07 UTC) #22
raymes
https://codereview.chromium.org/953793003/diff/80001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/953793003/diff/80001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode611 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:611: if (plugin_path.empty() && handler && Please merge this if-statement ...
5 years, 9 months ago (2015-03-19 00:39:22 UTC) #23
raymes
https://codereview.chromium.org/953793003/diff/80001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/80001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode233 content/browser/loader/buffered_resource_handler_unittest.cc:233: set_plugin_available(false); Let's set the plugin as available for most ...
5 years, 9 months ago (2015-03-19 00:45:51 UTC) #24
Deepak
@Raymes Changes done as suggested. PTAL https://codereview.chromium.org/953793003/diff/80001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/953793003/diff/80001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode611 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:611: if (plugin_path.empty() && ...
5 years, 9 months ago (2015-03-19 10:22:23 UTC) #25
Deepak
@Raymes Friendly Ping ...
5 years, 9 months ago (2015-03-23 13:46:23 UTC) #26
raymes
lgtm https://codereview.chromium.org/953793003/diff/100001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/100001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode158 content/browser/loader/buffered_resource_handler_unittest.cc:158: TestFakePluginService(bool fake_plugin_available) nit: plugin_available is fine https://codereview.chromium.org/953793003/diff/100001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode331 content/browser/loader/buffered_resource_handler_unittest.cc:331: ...
5 years, 9 months ago (2015-03-24 03:01:49 UTC) #28
jochen (gone - plz use gerrit)
https://codereview.chromium.org/953793003/diff/100001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h (right): https://codereview.chromium.org/953793003/diff/100001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h#newcode61 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h:61: net::URLRequest* request, URLRequest* should be the first parameter https://codereview.chromium.org/953793003/diff/100001/content/browser/loader/buffered_resource_handler_unittest.cc ...
5 years, 9 months ago (2015-03-24 09:20:55 UTC) #29
Deepak
@Raymes and @Jochen Thanks for review and providing valuable comments. Changes done as suggested. PTAL ...
5 years, 9 months ago (2015-03-24 10:33:47 UTC) #30
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-24 11:02:26 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/953793003/160001
5 years, 9 months ago (2015-03-24 14:16:56 UTC) #34
mmenke
I'm deferring to raymes on correctness of the code. https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc File content/browser/loader/buffered_resource_handler.cc (right): https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc#newcode334 content/browser/loader/buffered_resource_handler.cc:334: ...
5 years, 9 months ago (2015-03-24 14:44:32 UTC) #35
raymes
Thanks mmenke! https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc File content/browser/loader/buffered_resource_handler.cc (right): https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc#newcode334 content/browser/loader/buffered_resource_handler.cc:334: // away. if execution reaches here https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc#newcode339 ...
5 years, 9 months ago (2015-03-25 00:26:33 UTC) #37
Deepak
@Raymes & @mmenke Thanks for review, Changes done as suggested. PTAL https://codereview.chromium.org/953793003/diff/160001/content/browser/loader/buffered_resource_handler.cc File content/browser/loader/buffered_resource_handler.cc (right): ...
5 years, 9 months ago (2015-03-25 05:43:35 UTC) #38
mmenke
Looks good, thanks for the cleanups! Other than nits, just one question about the test. ...
5 years, 9 months ago (2015-03-25 14:11:44 UTC) #39
raymes
https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode352 content/browser/loader/buffered_resource_handler_unittest.cc:352: TestStreamIsIntercepted(allow_download, must_download, resource_type)); On 2015/03/25 14:11:44, mmenke wrote: > ...
5 years, 9 months ago (2015-03-25 23:32:08 UTC) #40
Deepak
Thanks for review. Changes done as suggested. PTAL https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler.cc File content/browser/loader/buffered_resource_handler.cc (right): https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler.cc#newcode303 content/browser/loader/buffered_resource_handler.cc:303: // ...
5 years, 9 months ago (2015-03-26 04:55:12 UTC) #41
mmenke
https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode352 content/browser/loader/buffered_resource_handler_unittest.cc:352: TestStreamIsIntercepted(allow_download, must_download, resource_type)); On 2015/03/26 04:55:11, Deepak wrote: > ...
5 years, 9 months ago (2015-03-26 14:59:28 UTC) #42
Deepak
On 2015/03/26 14:59:28, mmenke wrote: > https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc > File content/browser/loader/buffered_resource_handler_unittest.cc (right): > > https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode352 > ...
5 years, 9 months ago (2015-03-26 15:28:58 UTC) #43
mmenke
On 2015/03/26 15:28:58, Deepak wrote: > On 2015/03/26 14:59:28, mmenke wrote: > > > https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler_unittest.cc ...
5 years, 9 months ago (2015-03-26 15:36:24 UTC) #44
Deepak
On 2015/03/26 15:36:24, mmenke wrote: > On 2015/03/26 15:28:58, Deepak wrote: > > On 2015/03/26 ...
5 years, 9 months ago (2015-03-26 16:30:03 UTC) #45
mmenke
On 2015/03/26 16:30:03, Deepak wrote: > On 2015/03/26 15:36:24, mmenke wrote: > > On 2015/03/26 ...
5 years, 9 months ago (2015-03-26 16:35:15 UTC) #46
Deepak
On 2015/03/26 16:35:15, mmenke wrote: > On 2015/03/26 16:30:03, Deepak wrote: > > On 2015/03/26 ...
5 years, 9 months ago (2015-03-27 10:21:14 UTC) #47
mmenke
Sorry, forgot to get back to this one today. I'll take a look on Monday.
5 years, 8 months ago (2015-03-27 22:09:39 UTC) #48
raymes
https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler.h File content/browser/loader/buffered_resource_handler.h (right): https://codereview.chromium.org/953793003/diff/200001/content/browser/loader/buffered_resource_handler.h#newcode59 content/browser/loader/buffered_resource_handler.h:59: bool IsHandledByPlugin(bool* defer, bool* cancel_request); this should be request_handled ...
5 years, 8 months ago (2015-03-30 01:00:07 UTC) #49
mmenke
https://codereview.chromium.org/953793003/diff/240001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/240001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode107 content/browser/loader/buffered_resource_handler_unittest.cc:107: std::string* payload) override { Could you add an EXPECT ...
5 years, 8 months ago (2015-03-30 01:17:38 UTC) #50
Deepak
On 2015/03/30 01:17:38, mmenke wrote: @mmenke Thanks for review. Changes done as suggested. PTAL.
5 years, 8 months ago (2015-04-07 10:20:59 UTC) #51
Deepak
https://codereview.chromium.org/953793003/diff/240001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/240001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode107 content/browser/loader/buffered_resource_handler_unittest.cc:107: std::string* payload) override { On 2015/03/30 01:17:38, mmenke wrote: ...
5 years, 8 months ago (2015-04-07 10:21:16 UTC) #52
Deepak
@mmenke Thanks for review. Changes done as suggested. PTAL.
5 years, 8 months ago (2015-04-07 10:21:43 UTC) #53
mmenke
Just nits. https://codereview.chromium.org/953793003/diff/260001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/260001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode118 content/browser/loader/buffered_resource_handler_unittest.cc:118: int GetInterceptAsStream() { return intercepted_as_stream_count; } GetInterceptAsStream ...
5 years, 8 months ago (2015-04-07 14:52:51 UTC) #54
mmenke
Oh, and LGTM - guess you're in a rather different timezone than me, so holding ...
5 years, 8 months ago (2015-04-07 14:55:01 UTC) #55
Deepak
@mmenke Thanks for review. yes, I am in Indian Time zone. Changes done as suggested. ...
5 years, 8 months ago (2015-04-07 15:27:44 UTC) #56
mmenke
(Still LGTM, just 2 nits) https://codereview.chromium.org/953793003/diff/280001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/280001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode118 content/browser/loader/buffered_resource_handler_unittest.cc:118: const int intercepted_as_stream_count() { ...
5 years, 8 months ago (2015-04-07 15:33:24 UTC) #57
Deepak
Changes done. Thanks https://codereview.chromium.org/953793003/diff/280001/content/browser/loader/buffered_resource_handler_unittest.cc File content/browser/loader/buffered_resource_handler_unittest.cc (right): https://codereview.chromium.org/953793003/diff/280001/content/browser/loader/buffered_resource_handler_unittest.cc#newcode118 content/browser/loader/buffered_resource_handler_unittest.cc:118: const int intercepted_as_stream_count() { On 2015/04/07 ...
5 years, 8 months ago (2015-04-07 16:18:53 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/953793003/300001
5 years, 8 months ago (2015-04-08 04:43:34 UTC) #61
commit-bot: I haz the power
Committed patchset #16 (id:300001)
5 years, 8 months ago (2015-04-08 04:47:38 UTC) #62
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/d7d1167121bfe4b80d2cdf7559171aeff25c02c6 Cr-Commit-Position: refs/heads/master@{#324187}
5 years, 8 months ago (2015-04-08 04:48:34 UTC) #63
raymes
lgtm
5 years, 8 months ago (2015-04-08 06:28:39 UTC) #64
Deepak
5 years, 8 months ago (2015-04-13 04:08:11 UTC) #65
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:300001) has been created in
https://codereview.chromium.org/1081013002/ by deepak.m1@samsung.com.

The reason for reverting is: Need  to fix some more logic for r475390.
Once that will get fixed , I will re land this patch again..

Powered by Google App Engine
This is Rietveld 408576698