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

Issue 170843007: Introduce url::Origin to represent Web Origin. (Closed)

Created:
6 years, 10 months ago by yhirano
Modified:
6 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Introduce url::Origin to represent Web Origin. Introduce url::Origin to represent a serialized Web Origin defined in RFC6455. This class wraps a string representation of blink-side SecurityOrigin object. BUG=339373 R=tyoshino@chromium.org, ricea@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256789

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : Move SerializedOrigin from content/ to url/. #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Total comments: 8

Patch Set 8 : rebase #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 4

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -73 lines) Patch
M content/browser/renderer_host/websocket_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/websocket_host.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
M content/child/websocket_bridge.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -5 lines 0 comments Download
M content/common/websocket_messages.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M content/public/common/common_param_traits.h View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -0 lines 0 comments Download
M content/public/common/common_param_traits.cc View 1 2 3 4 5 6 7 8 2 chunks +23 lines, -0 lines 0 comments Download
M net/websockets/websocket_channel.h View 1 2 3 4 5 6 7 8 5 chunks +8 lines, -4 lines 0 comments Download
M net/websockets/websocket_channel.cc View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -3 lines 0 comments Download
M net/websockets/websocket_channel_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +7 lines, -6 lines 0 comments Download
M net/websockets/websocket_stream.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M net/websockets/websocket_stream.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -9 lines 0 comments Download
M net/websockets/websocket_stream_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 37 chunks +37 lines, -36 lines 0 comments Download
M net/websockets/websocket_test_util.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
A url/origin.h View 1 2 3 4 5 6 7 8 1 chunk +33 lines, -0 lines 0 comments Download
A url/origin.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download
A url/origin_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +36 lines, -0 lines 0 comments Download
M url/url.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M url/url_srcs.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
yhirano
PTAL? Using GURL to represent a Web Origin seems not correct. If this CL is ...
6 years, 10 months ago (2014-02-19 08:15:48 UTC) #1
Adam Rice
lgtm I agree.
6 years, 10 months ago (2014-02-19 08:21:50 UTC) #2
tyoshino (SeeGerritForStatus)
lgtm
6 years, 10 months ago (2014-02-20 04:38:03 UTC) #3
yhirano
+tsepez for websocket_messges.h
6 years, 10 months ago (2014-02-21 01:40:12 UTC) #4
Tom Sepez
On 2014/02/21 01:40:12, yhirano wrote: > +tsepez for websocket_messges.h Sorry, but this seems to go ...
6 years, 10 months ago (2014-02-21 20:40:19 UTC) #5
Tom Sepez
On 2014/02/21 20:40:19, Tom Sepez wrote: > On 2014/02/21 01:40:12, yhirano wrote: > > +tsepez ...
6 years, 10 months ago (2014-02-21 20:47:40 UTC) #6
abarth-chromium
It's too hard to represent an origin as a struct on the browser side. It's ...
6 years, 10 months ago (2014-02-21 21:50:56 UTC) #7
Tom Sepez
Ok. So I guess it stays a GURL. The reason the security team cares so ...
6 years, 10 months ago (2014-02-22 00:49:17 UTC) #8
abarth-chromium
I mean, you could have a type that wrapped a std::string if you wanted. Not ...
6 years, 10 months ago (2014-02-22 00:58:10 UTC) #9
Adam Rice
On 2014/02/22 00:58:10, abarth wrote: > I mean, you could have a type that wrapped ...
6 years, 10 months ago (2014-02-24 02:25:17 UTC) #10
abarth-chromium
On 2014/02/24 02:25:17, Adam Rice wrote: > On 2014/02/22 00:58:10, abarth wrote: > > I ...
6 years, 10 months ago (2014-02-24 03:09:04 UTC) #11
abarth-chromium
I'm confused why you would need that though. It's not correct to take a WebDocument's ...
6 years, 10 months ago (2014-02-24 03:11:04 UTC) #12
Adam Rice
On 2014/02/24 03:11:04, abarth wrote: > I'm confused why you would need that though. It's ...
6 years, 10 months ago (2014-02-24 03:31:23 UTC) #13
abarth-chromium
On 2014/02/24 03:31:23, Adam Rice wrote: > So, to summarise the situation as I understand ...
6 years, 10 months ago (2014-02-24 03:41:09 UTC) #14
yhirano
On 2014/02/24 03:41:09, abarth wrote: > > We probably need to introduce a new type ...
6 years, 10 months ago (2014-02-24 06:09:42 UTC) #15
abarth-chromium
This approach seems fine to me. @tsepez: Thoughts? https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h File content/common/serialized_origin.h (right): https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h#newcode19 content/common/serialized_origin.h:19: explicit ...
6 years, 10 months ago (2014-02-24 06:17:06 UTC) #16
Adam Rice
https://codereview.chromium.org/170843007/diff/310001/content/common/websocket_messages.h File content/common/websocket_messages.h (right): https://codereview.chromium.org/170843007/diff/310001/content/common/websocket_messages.h#newcode48 content/common/websocket_messages.h:48: IPC_STRUCT_TRAITS_MEMBER(string) Indentation.
6 years, 10 months ago (2014-02-24 06:48:25 UTC) #17
Tom Sepez
LGTM. To echo Adam's comment, its too bad this isn't defined at the same level ...
6 years, 10 months ago (2014-02-24 18:30:32 UTC) #18
Tom Sepez
https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h File content/common/serialized_origin.h (right): https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h#newcode15 content/common/serialized_origin.h:15: nit: possibly a comment that explains that this represents ...
6 years, 10 months ago (2014-02-24 18:30:52 UTC) #19
yhirano
On 2014/02/24 18:30:32, Tom Sepez wrote: > LGTM. To echo Adam's comment, its too bad ...
6 years, 10 months ago (2014-02-25 01:34:56 UTC) #20
abarth-chromium
/me defers to Tom.
6 years, 10 months ago (2014-02-25 07:19:51 UTC) #21
yhirano
tsepez, are you OK with #20?
6 years, 9 months ago (2014-03-03 09:04:45 UTC) #22
yhirano
I uploaded PS5 in accordance with #20. https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h File content/common/serialized_origin.h (right): https://codereview.chromium.org/170843007/diff/310001/content/common/serialized_origin.h#newcode15 content/common/serialized_origin.h:15: On 2014/02/24 ...
6 years, 9 months ago (2014-03-03 15:41:53 UTC) #23
Tom Sepez
LGTM. +brettw to keep him in the loop. https://codereview.chromium.org/170843007/diff/440001/content/public/common/common_param_traits.cc File content/public/common/common_param_traits.cc (right): https://codereview.chromium.org/170843007/diff/440001/content/public/common/common_param_traits.cc#newcode8 content/public/common/common_param_traits.cc:8: #include ...
6 years, 9 months ago (2014-03-03 19:09:29 UTC) #24
yhirano
https://codereview.chromium.org/170843007/diff/440001/content/public/common/common_param_traits.cc File content/public/common/common_param_traits.cc (right): https://codereview.chromium.org/170843007/diff/440001/content/public/common/common_param_traits.cc#newcode8 content/public/common/common_param_traits.cc:8: #include "content/public/common/content_constants.h" On 2014/03/03 19:09:30, Tom Sepez wrote: > ...
6 years, 9 months ago (2014-03-03 20:32:50 UTC) #25
yhirano
brettw: PTAL?
6 years, 9 months ago (2014-03-06 22:38:03 UTC) #26
brettw
I don't see an object named WebOrigin. What is that? Is that a Blink SecurityOrigin ...
6 years, 9 months ago (2014-03-07 17:43:51 UTC) #27
yhirano
On 2014/03/07 17:43:51, brettw wrote: > I don't see an object named WebOrigin. What is ...
6 years, 9 months ago (2014-03-10 00:54:56 UTC) #28
brettw
I feel like "SerializedOrigin" is the wrong name. Looking at it, it's not really a ...
6 years, 9 months ago (2014-03-10 20:59:03 UTC) #29
yhirano
Renamed: SerializedOrigin -> url::Origin https://codereview.chromium.org/170843007/diff/600001/url/serialized_origin.cc File url/serialized_origin.cc (right): https://codereview.chromium.org/170843007/diff/600001/url/serialized_origin.cc#newcode8 url/serialized_origin.cc:8: #include <string> On 2014/03/10 20:59:04, ...
6 years, 9 months ago (2014-03-12 02:27:05 UTC) #30
brettw
LGTM with suggestion https://codereview.chromium.org/170843007/diff/660001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/170843007/diff/660001/url/origin.cc#newcode14 url/origin.cc:14: DCHECK(origin == "null" || MatchPattern(origin, "?*://?*")); ...
6 years, 9 months ago (2014-03-12 05:34:54 UTC) #31
yhirano
https://codereview.chromium.org/170843007/diff/660001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/170843007/diff/660001/url/origin.cc#newcode14 url/origin.cc:14: DCHECK(origin == "null" || MatchPattern(origin, "?*://?*")); On 2014/03/12 05:34:54, ...
6 years, 9 months ago (2014-03-12 05:48:20 UTC) #32
abarth-chromium
url/ LGTM
6 years, 9 months ago (2014-03-12 18:54:59 UTC) #33
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 9 months ago (2014-03-13 01:21:06 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/170843007/710002
6 years, 9 months ago (2014-03-13 01:22:52 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 03:58:15 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg
6 years, 9 months ago (2014-03-13 03:58:16 UTC) #37
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 9 months ago (2014-03-13 04:01:02 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/170843007/710002
6 years, 9 months ago (2014-03-13 04:01:22 UTC) #39
yhirano
The CQ bit was unchecked by yhirano@chromium.org
6 years, 9 months ago (2014-03-13 06:57:31 UTC) #40
yhirano
The CQ bit was checked by yhirano@chromium.org
6 years, 9 months ago (2014-03-13 06:57:32 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/170843007/710002
6 years, 9 months ago (2014-03-13 06:57:57 UTC) #42
commit-bot: I haz the power
6 years, 9 months ago (2014-03-13 10:23:00 UTC) #43
Message was sent while issue was closed.
Change committed as 256789

Powered by Google App Engine
This is Rietveld 408576698