Closed
Bug 913214
Opened 12 years ago
Closed 12 years ago
Create StringUtils method to provide readable URL / title string
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 27
People
(Reporter: capella, Assigned: capella)
Details
Attachments
(1 file, 2 obsolete files)
|
7.39 KB,
patch
|
wesj
:
review+
sriram
:
review+
|
Details | Diff | Splinter Review |
Small code cleanup / followup from bug 912523 to avoid duplication of URL string methods
| Assignee | ||
Comment 1•12 years ago
|
||
For your reviewing pleasure ...
Attachment #800420 -
Flags: review?(wjohnston)
Attachment #800420 -
Flags: review?(sriram)
Comment 2•12 years ago
|
||
Comment on attachment 800420 [details] [diff] [review]
bug913214 v1
You could convert these two single calls to the new combined method as well, right?
http://dxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserToolbar.java#l1084
| Assignee | ||
Comment 3•12 years ago
|
||
ick ... forgot to grab that ...
| Assignee | ||
Comment 4•12 years ago
|
||
Incorporate code from comment #2 .... sorry for the bugzilla churn
Attachment #800420 -
Attachment is obsolete: true
Attachment #800420 -
Flags: review?(wjohnston)
Attachment #800420 -
Flags: review?(sriram)
Attachment #800744 -
Flags: review?(wjohnston)
Attachment #800744 -
Flags: review?(sriram)
Comment 5•12 years ago
|
||
Comment on attachment 800744 [details] [diff] [review]
bug913214 v2
Review of attachment 800744 [details] [diff] [review]:
-----------------------------------------------------------------
I think maybe we could strip https in the urlbar, but I'd rather do it explicitly in a different bug where we can get some ux/sec review.
::: mobile/android/base/util/StringUtils.java
@@ +56,5 @@
> int end = url.length();
>
> if (url.startsWith("http://")) {
> start = 7;
> + } else if (url.startsWith("https://")) {
Hmm... so we intentionally don't do this in the urlbar for security reasons (although I kinda want to do it anyway, and we already show a lock there...). I would suggest, if we want it gone in some places, but not others that you add a flag to this method and then overload it. i.e.
class UrlFlags {
public static final int NONE = 0;
public static final int STRIP_HTTPS = 1; // (or maybe DONT_STRIP_HTTPS?)
}
stripScheme(String url) {
return stripScheme(url, UrlFlags.NONE);
}
stripScheme(String url, int flags) {
// ...
else if (url.startsWith("https://") && flags == UrlFlags.STRIP_HTTPS) {
}
// ...
}
Attachment #800744 -
Flags: review?(wjohnston)
| Assignee | ||
Comment 6•12 years ago
|
||
As requested, a little more tighter.
I agree it's hacky with the security conscious flag ... I'd like very much to follow-up and file that "explicitly different bug where we can get some ux/sec review".
Attachment #800744 -
Attachment is obsolete: true
Attachment #800744 -
Flags: review?(sriram)
Attachment #801005 -
Flags: review?(wjohnston)
Attachment #801005 -
Flags: review?(sriram)
Updated•12 years ago
|
Attachment #801005 -
Flags: review?(wjohnston) → review+
Comment 7•12 years ago
|
||
Comment on attachment 801005 [details] [diff] [review]
bug913214 v3
Review of attachment 801005 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me. Though I would like to use enums.
Attachment #801005 -
Flags: review?(sriram) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
Try try again ...
https://tbpl.mozilla.org/?tree=Try&rev=4730b21c5f48
| Assignee | ||
Comment 9•12 years ago
|
||
Onward and upward!
https://hg.mozilla.org/integration/fx-team/rev/3057a627c682
Comment 10•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•