Closed
Bug 1552446
Opened 5 years ago
Closed 5 years ago
Leverage Remote Settings attachments utils for intermediates
Categories
(Core :: Security: PSM, enhancement, P2)
Tracking
()
RESOLVED
FIXED
mozilla73
People
(Reporter: leplatrem, Assigned: leplatrem)
References
Details
(Whiteboard: [psm-backlog])
Attachments
(1 file)
In Bug 1501214 we shipped some utils to download attachments.
The intermediate preloads clients precedes it and a lot of code is duplicated between the two.
Some of the code could be rewritten to leverage the attachments utils. For example, something like that:
ChromeUtils.defineModuleGetter(this, "Downloader", "resource://services-settings/Attachments.jsm");
async updatePreloadedIntermediates() {
const records = this.client.get({
filters: {
cert_import_complete: false,
}
});
for (const record of records) {
let localUri;
try {
localUri = await client.attachments.download(record);
} catch (e) {
if (e instanceof Downloader.DownloadError) {
// download error ...
// Services.telemetry...
} else if (e instanceof Downloader.ContentError) {
// hash, length error ...
// Services.telemetry...
} else {
// ...
}
continue;
}
// const buffer = await (await fetch(localUri)).arrayBuffer();
// const bytes = new Uint8Array(buffer);
// const text = await (await fetch(localUri)).text();
}
}
Updated•5 years ago
|
Priority: -- → P2
Whiteboard: [psm-backlog]
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → mathieu
Assignee | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:leplatrem, could you have a look please?
For more information, please visit auto_nag documentation.
Flags: needinfo?(mathieu)
Pushed by mleplatre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b5bcdecb7ad Leverage Remote Settings attachments utils for intermediates r=glasserc,jcj
Comment 4•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Updated•5 years ago
|
Flags: needinfo?(mathieu)
You need to log in
before you can comment on or make changes to this bug.
Description
•