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

Issue 1133943002: Create net::FormatOriginForDisplay helper function. (Closed)

Created:
5 years, 7 months ago by palmer
Modified:
5 years, 7 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create net::FormatOriginForDisplay helper function. net::FormatOriginForDisplay provides a canonical, concise, human-friendly display for origins. It supports callers in any higher-layer module. Based heavily on earlier work by dewittj and felt. Thanks! BUG=402698 TBR=thakis,brettw Committed: https://crrev.com/f39e5aff5aae8451a7ef190a2fc822bf80c4e30d Cr-Commit-Position: refs/heads/master@{#330254}

Patch Set 1 #

Patch Set 2 : Add tests, make them pass, note TODOs for the future. #

Patch Set 3 : Soothe cranky Windows compiler. #

Total comments: 16

Patch Set 4 : Fixes, tests, and put the big TODO in the right place. #

Total comments: 9

Patch Set 5 : Simplify the implementation for FormatOriginForDisplay, disentangling it form FormatUrl, thus fixin… #

Patch Set 6 : Call examples for FormatOriginForDisplay in the comments. #

Patch Set 7 : Remove the now-unused kFormatUrlOmit{Scheme,Port}. #

Patch Set 8 : Crucial punctuation in comment. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -13 lines) Patch
M base/strings/utf_string_conversions.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M net/base/net_util.h View 1 2 3 4 5 6 7 5 chunks +27 lines, -7 lines 0 comments Download
M net/base/net_util_icu.cc View 1 2 3 4 5 6 2 chunks +43 lines, -1 line 8 comments Download
M net/base/net_util_icu_unittest.cc View 1 2 3 4 2 chunks +179 lines, -0 lines 0 comments Download
M url/gurl.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (4 generated)
palmer
This picks up previous work by dewittj: https://codereview.chromium.org/493253003/ and felt: https://codereview.chromium.org/532523002/ Note that it is ...
5 years, 7 months ago (2015-05-09 00:13:15 UTC) #2
palmer
> Note that it is not yet ready to land: I need to write some ...
5 years, 7 months ago (2015-05-11 20:51:28 UTC) #3
asanka
https://codereview.chromium.org/1133943002/diff/40001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/40001/net/base/net_util_icu.cc#newcode755 net/base/net_util_icu.cc:755: new_parsed->port.reset(); The else clause now includes the 'parsed.port.is_nonempty() && ...
5 years, 7 months ago (2015-05-11 23:39:44 UTC) #4
palmer
https://codereview.chromium.org/1133943002/diff/40001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/40001/net/base/net_util_icu.cc#newcode755 net/base/net_util_icu.cc:755: new_parsed->port.reset(); On 2015/05/11 23:39:44, asanka wrote: > The else ...
5 years, 7 months ago (2015-05-12 22:20:53 UTC) #5
felt
https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h File net/base/net_util.h (right): https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h#newcode361 net/base/net_util.h:361: // in contexts where the origin is always secure ...
5 years, 7 months ago (2015-05-13 22:50:14 UTC) #6
asanka
https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util_icu.cc#newcode756 net/base/net_util_icu.cc:756: parsed.port.begin, parsed.port.len, 0)); We are also dropping the colon.
5 years, 7 months ago (2015-05-14 03:42:47 UTC) #7
palmer
https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util_icu.cc#newcode855 net/base/net_util_icu.cc:855: return base::ASCIIToUTF16("filesystem:") + > will this sometimes yield filesystem:url ...
5 years, 7 months ago (2015-05-14 18:10:05 UTC) #8
palmer
https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h File net/base/net_util.h (right): https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h#newcode361 net/base/net_util.h:361: // in contexts where the origin is always secure ...
5 years, 7 months ago (2015-05-14 18:18:02 UTC) #9
felt
https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h File net/base/net_util.h (right): https://codereview.chromium.org/1133943002/diff/60001/net/base/net_util.h#newcode361 net/base/net_util.h:361: // in contexts where the origin is always secure ...
5 years, 7 months ago (2015-05-14 18:22:13 UTC) #10
palmer
> > I'd like to leave that to the caller to decide, e.g. > > ...
5 years, 7 months ago (2015-05-14 23:21:49 UTC) #11
palmer
TBRing thakis (base/OWNERS) and brettw (url/OWNERS) because I'm only changing comments in those directories. asanka: ...
5 years, 7 months ago (2015-05-15 20:46:27 UTC) #12
felt
I'm wondering about RTL languages. Do you need to test cases to make sure the ...
5 years, 7 months ago (2015-05-15 20:51:24 UTC) #13
palmer
> I'm wondering about RTL languages. Do you need to test cases to make sure ...
5 years, 7 months ago (2015-05-15 21:01:16 UTC) #14
felt
On 2015/05/15 21:01:16, palmer wrote: > > I'm wondering about RTL languages. Do you need ...
5 years, 7 months ago (2015-05-15 21:10:10 UTC) #15
felt
On 2015/05/15 21:10:10, felt wrote: > On 2015/05/15 21:01:16, palmer wrote: > > > I'm ...
5 years, 7 months ago (2015-05-15 21:14:53 UTC) #16
asanka
lgtm
5 years, 7 months ago (2015-05-15 21:16:25 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133943002/140001
5 years, 7 months ago (2015-05-15 21:20:51 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 7 months ago (2015-05-16 00:53:13 UTC) #20
Ryan Sleevi
I previously objected to putting this in //net, which shouldn't have to worry itself about ...
5 years, 7 months ago (2015-05-16 01:21:09 UTC) #22
Ryan Sleevi
https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc#newcode835 net/base/net_util_icu.cc:835: if (!url.IsStandard()) BUG: You should be checking how invalid ...
5 years, 7 months ago (2015-05-16 01:26:04 UTC) #23
Ryan Sleevi
Actually adding Nico and Brett to this review, since you TBR'd them to commit this.
5 years, 7 months ago (2015-05-16 01:27:07 UTC) #25
palmer
> I previously objected to putting this in //net, which shouldn't have to worry > ...
5 years, 7 months ago (2015-05-16 01:31:24 UTC) #26
Ryan Sleevi
On 2015/05/16 01:31:24, palmer wrote: > * Other net/ code might want to call it ...
5 years, 7 months ago (2015-05-16 01:36:35 UTC) #27
palmer
https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc#newcode835 net/base/net_util_icu.cc:835: if (!url.IsStandard()) > BUG: You should be checking how ...
5 years, 7 months ago (2015-05-16 01:37:19 UTC) #28
palmer
> Actually adding Nico and Brett to this review, since you TBR'd them to commit ...
5 years, 7 months ago (2015-05-16 01:37:51 UTC) #29
Ryan Sleevi
https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc File net/base/net_util_icu.cc (right): https://codereview.chromium.org/1133943002/diff/140001/net/base/net_util_icu.cc#newcode835 net/base/net_util_icu.cc:835: if (!url.IsStandard()) On 2015/05/16 01:37:18, palmer wrote: > > ...
5 years, 7 months ago (2015-05-16 01:43:01 UTC) #30
Nico
On 2015/05/16 01:37:51, palmer wrote: > > Actually adding Nico and Brett to this review, ...
5 years, 7 months ago (2015-05-16 01:43:09 UTC) #31
palmer
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/1131813004/ by palmer@chromium.org. ...
5 years, 7 months ago (2015-05-16 02:09:21 UTC) #32
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:30:13 UTC) #33
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f39e5aff5aae8451a7ef190a2fc822bf80c4e30d
Cr-Commit-Position: refs/heads/master@{#330254}

Powered by Google App Engine
This is Rietveld 408576698