Closed Bug 1109291 Opened 10 years ago Closed 10 years ago

Use relative paths for more addons in BHR

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file)

We should support addons like LastPass and ADP
Could you be more specific? Full paths can be a privacy risk and I'd like to review the proposal before this is shipped. The less data we can collect while still answering the necessary questions, the better.
What Jim means with full paths are actually relative paths (e.g. relative to the profile). We are already doing this for filenames in fileIOReports (e.g. {profile}\extensions\abs@avira.com\js\bunches\background.js). 

Without the relative paths it's hard to associate a js filename with a specific add-on as there can be clashes with filenames belonging to other add-ons or to our own codebase.
Summary: Use full paths for more addons in BHR → Use relative paths for more addons in BHR
Right, it's not a full path. For addon scripts in the profile extensions directory (e.g., "file:///home/{user}/.mozilla/firefox/{profile}/extensions/{addon}/components/foo.js"), we want to return "{addon}/components/foo.js" instead of "foo.js".

To do that, we can get the profile path and match that against the script filename, but I think an easier way is to check if the filename contains an "/extensions/" component, and if it does, we extract the part after "/extensions/". I can't think of another case where a chrome script would have "/extensions/" in its path, besides addons scripts under the profile directory, but I could be forgetting something.
Attachment #8534512 - Flags: review?(snorp)
Attachment #8534512 - Flags: review?(benjamin)
Attachment #8534512 - Flags: review?(snorp) → review+
Comment on attachment 8534512 [details] [diff] [review]
Include better paths for hanging chrome scripts in profile extensions directory (v1)

Yes I think this is ok.
Attachment #8534512 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/55aa832003c1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: