Closed Bug 1531806 Opened 5 years ago Closed 5 years ago

PgpMimeProxy: Pass URI to extensions

Categories

(MailNews Core :: MIME, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 67.0

People

(Reporter: patrick, Assigned: patrick)

References

Details

Attachments

(1 file, 1 obsolete file)

We need a new solution to pass myUri to addons.

Follow-up to 1531307

Assignee: nobody → patrick
Depends on: 1531307

Yes, I'm think along that line. If we add "uri" to the interface in nsIPgpMimeProxy.idl, then we only need to change this:

nsCOMPtr<nsIURI> uri;
if (channel)
  channel->GetURI(getter_AddRefs(uri));

to:

nsCOMPtr<nsIURI> mUri;
if (channel)
  channel->GetURI(getter_AddRefs(mUri));

and we can remove myUri from SetMimeCallback.

Attached patch Patch v1 (obsolete) — Splinter Review

The patch adds messageURI to nsIPgpMimeProxy. This way, the URI can be read via the nsIRequest object.

Attachment #9047967 - Flags: review?(jorgk)
Comment on attachment 9047967 [details] [diff] [review]
Patch v1

Review of attachment 9047967 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good with the comment addressed. I haven't tested it, I guess it will do what you need.

::: mailnews/mime/cthandlers/pgpmime/nsPgpMimeProxy.cpp
@@ +298,5 @@
>  // nsPgpMimeProxy implementation
>  nsPgpMimeProxy::nsPgpMimeProxy()
>    : mInitialized(false),
>      mDecryptor(nullptr),
>      mLoadGroup(nullptr),

These two above are unnecessary and should be removed.

@@ +301,5 @@
>      mDecryptor(nullptr),
>      mLoadGroup(nullptr),
>      mLoadFlags(LOAD_NORMAL),
> +    mCancelStatus(NS_OK),
> +    mMessageURI(nullptr)

The constructor or nsCOMPtr already nulls the pointer, so you can remove this.
Attachment #9047967 - Flags: review?(jorgk) → review+
Attached patch patch v1.1Splinter Review

Thanks here is the updated patch. I tried it successfully with an adopted version of Enigmail.

Can you commit it?

Attachment #9047967 - Attachment is obsolete: true
Flags: needinfo?(jorgk)

Sure.

Flags: needinfo?(jorgk)
Keywords: checkin-needed
Comment on attachment 9048021 [details] [diff] [review]
patch v1.1

Thanks.
Attachment #9048021 - Flags: review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/f58cbe43514a
Add nsIPgpMimeProxy.messageURI. r=jorgk

Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 67.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: