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

Issue 1393193005: Implement $Secure- cookie prefix (Closed)

Created:
5 years, 2 months ago by estark
Modified:
5 years ago
CC:
cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, extensions-reviews_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement $Secure- cookie prefix This CL implements the rule that cookies whose names start with $Secure- can only be set if the Secure attribute is enabled. The implementation is a runtime-enabled web platform feature for now. Intent to Implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IU5t6eLuS2Y/Uq-7Kat9BwAJ BUG=541511 TBR=droger@chromium.org Committed: https://crrev.com/467a098174e062d4380eb0ad8f7b2f0b0b7ed5fa Cr-Commit-Position: refs/heads/master@{#354676} Committed: https://crrev.com/cd39c11f87f9c660f6b11173f53c49928c39018d Cr-Commit-Position: refs/heads/master@{#354832}

Patch Set 1 #

Patch Set 2 : add another test #

Total comments: 10

Patch Set 3 : mkwst comments, split out rename into separate CL #

Total comments: 2

Patch Set 4 : add test #

Total comments: 2

Patch Set 5 : remove ContentBrowserClient method #

Total comments: 2

Patch Set 6 : limit prefixed cookies to secure origins #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : don't modify context after init #

Total comments: 1

Patch Set 9 : fix capitalization #

Patch Set 10 : android fix #

Patch Set 11 : rebase #

Patch Set 12 : TODO clarification #

Patch Set 13 : fix cookie monster tests #

Patch Set 14 : test fixes #

Patch Set 15 : another ios test fix #

Patch Set 16 : move SpawnedTestServer tests into non-ios section #

Patch Set 17 : use EmbeddedTestServer to fix android test #

Patch Set 18 : test fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -11 lines) Patch
M chrome/browser/android/cookies/cookies_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_api.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_message_filter.cc View 1 2 3 4 3 chunks +6 lines, -0 lines 0 comments Download
M ios/net/cookies/cookie_store_ios_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 2 3 4 5 9 chunks +22 lines, -2 lines 0 comments Download
M net/cookies/cookie_monster_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +28 lines, -4 lines 0 comments Download
M net/cookies/cookie_options.h View 2 chunks +6 lines, -0 lines 0 comments Download
M net/cookies/cookie_options.cc View 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/cookie_store_unittest.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 2 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +202 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (21 generated)
estark
Mike, here's a rough draft for your reviewing pleasure. It probably needs more tests. Also, ...
5 years, 2 months ago (2015-10-09 13:51:57 UTC) #2
Mike West
This looks quite good. Sorry for the annoyance of piping through the boolean everywhere. https://codereview.chromium.org/1393193005/diff/20001/net/base/network_delegate.h ...
5 years, 2 months ago (2015-10-09 15:41:33 UTC) #3
Mike West
https://codereview.chromium.org/1393193005/diff/20001/net/url_request/url_request_test_util.cc File net/url_request/url_request_test_util.cc (right): https://codereview.chromium.org/1393193005/diff/20001/net/url_request/url_request_test_util.cc#newcode620 net/url_request/url_request_test_util.cc:620: return first_party_only_cookies_enabled_; Nit: Should probably rename this as well.
5 years, 2 months ago (2015-10-09 15:54:33 UTC) #4
estark
Thanks, Mike. I split out the rename into crrev.com/1392853006 and addressed your comments. (The trybot ...
5 years, 2 months ago (2015-10-10 05:04:02 UTC) #5
Mike West
You'll need someone to take a look at //net/url_request, //content, and //chrome/browser, but //net/cookies LGTM. ...
5 years, 2 months ago (2015-10-10 09:34:24 UTC) #6
Mike West
(Nit: Would you mind linking to the Intent to Implement thread in the CL description?)
5 years, 2 months ago (2015-10-10 09:34:42 UTC) #7
estark
On 2015/10/10 09:34:42, Mike West (slow) wrote: > (Nit: Would you mind linking to the ...
5 years, 2 months ago (2015-10-12 09:27:01 UTC) #9
estark
jam: could you please review //content? mmenke: could you please review //net/url_request? (This is the ...
5 years, 2 months ago (2015-10-12 09:27:53 UTC) #11
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode647 chrome/browser/chrome_content_browser_client.cc:647: ->HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)), that's a content switch, you can just access ...
5 years, 2 months ago (2015-10-12 09:31:41 UTC) #13
estark
https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode647 chrome/browser/chrome_content_browser_client.cc:647: ->HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)), On 2015/10/12 09:31:41, jochen wrote: > that's a ...
5 years, 2 months ago (2015-10-12 09:39:19 UTC) #14
jochen (gone - plz use gerrit)
On 2015/10/12 at 09:39:19, estark wrote: > https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc > File chrome/browser/chrome_content_browser_client.cc (right): > > https://codereview.chromium.org/1393193005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode647 ...
5 years, 2 months ago (2015-10-12 09:40:17 UTC) #15
estark
On 2015/10/12 09:40:17, jochen wrote: > On 2015/10/12 at 09:39:19, estark wrote: > > > ...
5 years, 2 months ago (2015-10-12 10:04:11 UTC) #19
estark
jam: removing you as a reviewer because I forgot jochen is a content/ owner and ...
5 years, 2 months ago (2015-10-12 10:04:51 UTC) #21
Mike West
https://codereview.chromium.org/1393193005/diff/160001/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/1393193005/diff/160001/net/cookies/cookie_monster.cc#newcode336 net/cookies/cookie_monster.cc:336: if (cc->Name().find(kSecurePrefix) == 0) Let's lock this down to ...
5 years, 2 months ago (2015-10-12 10:59:04 UTC) #22
jochen (gone - plz use gerrit)
chrome & content lgtm
5 years, 2 months ago (2015-10-12 11:01:38 UTC) #23
estark
https://codereview.chromium.org/1393193005/diff/160001/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/1393193005/diff/160001/net/cookies/cookie_monster.cc#newcode336 net/cookies/cookie_monster.cc:336: if (cc->Name().find(kSecurePrefix) == 0) On 2015/10/12 10:59:04, Mike West ...
5 years, 2 months ago (2015-10-12 11:39:43 UTC) #24
mmenke
https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc#newcode9527 net/url_request/url_request_unittest.cc:9527: default_context_.set_network_delegate(&network_delegate); It's not a good idea to modify a ...
5 years, 2 months ago (2015-10-12 14:21:56 UTC) #25
estark
https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc#newcode9527 net/url_request/url_request_unittest.cc:9527: default_context_.set_network_delegate(&network_delegate); On 2015/10/12 14:21:56, mmenke wrote: > It's not ...
5 years, 2 months ago (2015-10-12 14:36:32 UTC) #26
mmenke
On 2015/10/12 14:36:32, estark wrote: > https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc > File net/url_request/url_request_unittest.cc (right): > > https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc#newcode9527 > ...
5 years, 2 months ago (2015-10-12 14:48:06 UTC) #27
estark
On 2015/10/12 14:48:06, mmenke wrote: > On 2015/10/12 14:36:32, estark wrote: > > > https://codereview.chromium.org/1393193005/diff/180001/net/url_request/url_request_unittest.cc ...
5 years, 2 months ago (2015-10-12 15:02:58 UTC) #28
Mike West
//net/cookies still LGTM after the cc.Source() change. Matt, are you happy with the changes to ...
5 years, 2 months ago (2015-10-15 09:28:34 UTC) #29
mmenke
Sorry, thought I signed off before. LGTM (Just looked at net/) Should we have tests ...
5 years, 2 months ago (2015-10-15 15:58:35 UTC) #30
mmenke
On 2015/10/15 15:58:35, mmenke wrote: > Sorry, thought I signed off before. LGTM (Just looked ...
5 years, 2 months ago (2015-10-15 16:00:38 UTC) #31
estark
On 2015/10/15 15:58:35, mmenke wrote: > Sorry, thought I signed off before. LGTM (Just looked ...
5 years, 2 months ago (2015-10-15 16:03:34 UTC) #32
mmenke
On 2015/10/15 16:03:34, estark wrote: > On 2015/10/15 15:58:35, mmenke wrote: > > Sorry, thought ...
5 years, 2 months ago (2015-10-15 16:08:50 UTC) #33
mmenke
On 2015/10/15 16:08:50, mmenke wrote: > On 2015/10/15 16:03:34, estark wrote: > > On 2015/10/15 ...
5 years, 2 months ago (2015-10-15 16:10:48 UTC) #34
estark
- Added a comment to address mmenke's confusion about the nonexperimental test. - Fixed iOS ...
5 years, 2 months ago (2015-10-16 18:15:38 UTC) #37
mmenke
On 2015/10/16 18:15:38, estark wrote: > - Added a comment to address mmenke's confusion about ...
5 years, 2 months ago (2015-10-16 18:20:19 UTC) #38
estark
droger: TBRing you for a small ios cookie test change
5 years, 2 months ago (2015-10-16 22:38:07 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193005/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193005/420001
5 years, 2 months ago (2015-10-16 22:39:50 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/118370)
5 years, 2 months ago (2015-10-17 00:35:00 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193005/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193005/420001
5 years, 2 months ago (2015-10-17 05:49:21 UTC) #47
commit-bot: I haz the power
Committed patchset #16 (id:420001)
5 years, 2 months ago (2015-10-17 06:42:19 UTC) #48
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/467a098174e062d4380eb0ad8f7b2f0b0b7ed5fa Cr-Commit-Position: refs/heads/master@{#354676}
5 years, 2 months ago (2015-10-17 06:43:22 UTC) #49
Mattias Nissler (ping if slow)
A revert of this CL (patchset #16 id:420001) has been created in https://codereview.chromium.org/1409243003/ by mnissler@chromium.org. ...
5 years, 2 months ago (2015-10-19 08:07:33 UTC) #50
mmenke
Sorry, I should have caught that - an Android test can only have one spawned ...
5 years, 2 months ago (2015-10-19 14:01:08 UTC) #51
mmenke
On 2015/10/19 14:01:08, mmenke wrote: > Sorry, I should have caught that - an Android ...
5 years, 2 months ago (2015-10-19 14:01:35 UTC) #52
estark
On 2015/10/19 14:01:08, mmenke wrote: > Sorry, I should have caught that - an Android ...
5 years, 2 months ago (2015-10-19 15:10:59 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193005/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193005/440001
5 years, 2 months ago (2015-10-19 15:11:20 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/68246)
5 years, 2 months ago (2015-10-19 15:31:12 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393193005/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393193005/460001
5 years, 2 months ago (2015-10-19 18:05:56 UTC) #62
commit-bot: I haz the power
Committed patchset #18 (id:460001)
5 years, 2 months ago (2015-10-19 19:46:46 UTC) #63
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/cd39c11f87f9c660f6b11173f53c49928c39018d Cr-Commit-Position: refs/heads/master@{#354832}
5 years, 2 months ago (2015-10-19 19:48:09 UTC) #64
droger
https://codereview.chromium.org/1393193005/diff/460001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/1393193005/diff/460001/net/url_request/url_request_http_job.cc#newcode752 net/url_request/url_request_http_job.cc:752: if (network_delegate()->AreExperimentalCookieFeaturesEnabled()) Is it supported to have a null ...
5 years ago (2015-12-01 13:10:23 UTC) #65
mmenke
5 years ago (2015-12-01 15:55:53 UTC) #66
Message was sent while issue was closed.
https://codereview.chromium.org/1393193005/diff/460001/net/url_request/url_re...
File net/url_request/url_request_http_job.cc (right):

https://codereview.chromium.org/1393193005/diff/460001/net/url_request/url_re...
net/url_request/url_request_http_job.cc:752: if
(network_delegate()->AreExperimentalCookieFeaturesEnabled())
On 2015/12/01 13:10:23, droger wrote:
> Is it supported to have a null delegate?
> I see that a lot of places test for the existence of the delegate before
calling
> it, but this is not done here.
> See line 663 above for example.
> 
> There is some code (ios/crnet/crnet_environment) that sets up the network
stack
> without network delegate, and it now crashes here. Should I use a dummy
delegate
> there, or should we fix this call to support the null delegate?

Hrm...we generally allow a NULL delegate.  The fact that apparently not a lot of
tests use HTTP requests with NULL delegates, so this wasn't caught indicates
that perhaps we should rethink supporting the NULL delegate case.

For now, though, this code should be fixed.

Powered by Google App Engine
This is Rietveld 408576698