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

Issue 385024: Propagate the "first party for cookies" from WebKit through the resource... (Closed)

Created:
11 years, 1 month ago by wtc
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, fbarchard, Alpha Left Google, Paul Godavari, jam, awong, ben+cc_chromium.org, scherkus (not reviewing)
Visibility:
Public.

Description

Propagate the "first party for cookies" from WebKit to the network stack when we follow a redirect, because WebKit's MainResourceLoader::willSendRequest method may change the "first party for cookies" URL of the resource request. R=abarth BUG=25133 TEST=In Options menu, change cookie policy to "Accept cookies only from sites I visit" and then follow the instructions in issue 25133 comment 20. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31951

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : Add resource_dispatcher_unittest.cc to the CL. #

Patch Set 4 : Add simple_resource_loader_bridge.cc to the CL to fix the bug for test_shell. #

Total comments: 8

Patch Set 5 : Address eroman's review comments #

Total comments: 4

Patch Set 6 : Remove a DCHECK that fails in some ui_tests #

Patch Set 7 : Upload before checkin #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -35 lines) Patch
M chrome/browser/renderer_host/resource_dispatcher_host.h View 1 2 3 4 5 6 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 4 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/safe_browsing_resource_handler.cc View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/common/resource_dispatcher_unittest.cc View 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/common/security_filter_peer.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/security_filter_peer.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/plugin/chrome_plugin_host.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M net/url_request/url_request.h View 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M webkit/glue/media/buffered_data_source.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/media/buffered_data_source.cc View 5 6 1 chunk +3 lines, -1 line 0 comments Download
M webkit/glue/media/simple_data_source.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/media/simple_data_source.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M webkit/glue/resource_loader_bridge.h View 1 2 3 4 5 6 3 chunks +10 lines, -5 lines 2 comments Download
M webkit/glue/weburlloader_impl.cc View 1 2 3 4 5 6 4 chunks +8 lines, -4 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 4 5 6 2 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
wtc
Here is the second solution: propagate "first party for cookies" from WebKit, through the resource ...
11 years, 1 month ago (2009-11-11 00:13:31 UTC) #1
wtc
Reviewers: abarth, Message: Here is the second solution: propagate "first party for cookies" from WebKit, ...
11 years, 1 month ago (2009-11-11 00:13:49 UTC) #2
abarth-chromium
Unfortunately, this is a better way to get the information. Only WebKit knows what the ...
11 years, 1 month ago (2009-11-11 08:35:16 UTC) #3
abarth-chromium
Unfortunately, this is a better way to get the information. Only WebKit knows what the ...
11 years, 1 month ago (2009-11-11 08:35:35 UTC) #4
wtc
darin is on vacation, so I asked eroman to review this CL. eroman suggested that ...
11 years, 1 month ago (2009-11-11 23:06:51 UTC) #5
eroman
Overall this looks good. My main comments are on the organization of the code, and ...
11 years, 1 month ago (2009-11-12 10:24:37 UTC) #6
wtc
eroman: thanks a lot for your review! I made all the changes you suggested except: ...
11 years, 1 month ago (2009-11-13 02:54:44 UTC) #7
eroman
LGTM thanks for digging into this! http://codereview.chromium.org/385024/diff/6059/69 File chrome/common/resource_dispatcher_unittest.cc (right): http://codereview.chromium.org/385024/diff/6059/69#newcode39 Line 39: *new_first_party_for_cookies = ...
11 years, 1 month ago (2009-11-13 03:19:52 UTC) #8
abarth-chromium
Wan-Teh, please try to get this into Mstone-4. I think this might be the fix ...
11 years, 1 month ago (2009-11-13 04:23:39 UTC) #9
darin (slow to review)
http://codereview.chromium.org/385024/diff/9001/8005 File webkit/glue/resource_loader_bridge.h (right): http://codereview.chromium.org/385024/diff/9001/8005#newcode120 Line 120: GURL* new_first_party_for_cookies) = 0; nit: down below, this ...
11 years, 1 month ago (2009-11-16 17:59:50 UTC) #10
wtc
http://codereview.chromium.org/385024/diff/9001/8005 File webkit/glue/resource_loader_bridge.h (right): http://codereview.chromium.org/385024/diff/9001/8005#newcode120 Line 120: GURL* new_first_party_for_cookies) = 0; On 2009/11/16 17:59:50, darin ...
11 years, 1 month ago (2009-11-16 20:25:57 UTC) #11
darin (slow to review)
11 years, 1 month ago (2009-11-16 22:04:56 UTC) #12
On Mon, Nov 16, 2009 at 12:25 PM, <wtc@chromium.org> wrote:

>
> http://codereview.chromium.org/385024/diff/9001/8005
> File webkit/glue/resource_loader_bridge.h (right):
>
> http://codereview.chromium.org/385024/diff/9001/8005#newcode120
> Line 120: GURL* new_first_party_for_cookies) = 0;
> On 2009/11/16 17:59:50, darin wrote:
>
>> nit: down below, this is called the "policy_url" ...
>>
>
>  it would be good to either name this new_policy_url, or rename
>>
> policy_url to
>
>> first_party_for_cookies.
>>
>
> I will rename policy_url to first_party_for_cookies in
> the declaration of the Create() method below, because
> the two definitions of the Create() method (in
> renderer_glue.cc and simple_resource_loader_bridge.cc)
> name this parameter first_party_for_cookies.
>
>
OK, sounds good.



> I found that both policy_url and first_party_for_cookies
> are used in many places.  This inconsistency of parameter
> name is unfortunate.
>
>

Agreed.

-Darin


>
> http://codereview.chromium.org/385024
>

Powered by Google App Engine
This is Rietveld 408576698