mshtml: Use IUri for nsURL::[Get|Set]Password implementation.
This commit is contained in:
parent
4e17e38aa2
commit
0aefffe9b4
|
@ -1780,26 +1780,33 @@ static nsresult NSAPI nsURI_GetPassword(nsIURL *iface, nsACString *aPassword)
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, aPassword);
|
TRACE("(%p)->(%p)\n", This, aPassword);
|
||||||
|
|
||||||
if(This->nsuri)
|
return get_uri_string(This, Uri_PROPERTY_PASSWORD, aPassword);
|
||||||
return nsIURI_GetPassword(This->nsuri, aPassword);
|
|
||||||
|
|
||||||
FIXME("default action not implemented\n");
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsresult NSAPI nsURI_SetPassword(nsIURL *iface, const nsACString *aPassword)
|
static nsresult NSAPI nsURI_SetPassword(nsIURL *iface, const nsACString *aPassword)
|
||||||
{
|
{
|
||||||
nsWineURI *This = NSURI_THIS(iface);
|
nsWineURI *This = NSURI_THIS(iface);
|
||||||
|
const char *passa;
|
||||||
|
WCHAR *pass;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aPassword));
|
TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aPassword));
|
||||||
|
|
||||||
if(This->nsuri) {
|
if(!ensure_uri_builder(This))
|
||||||
invalidate_uri(This);
|
return NS_ERROR_UNEXPECTED;
|
||||||
return nsIURI_SetPassword(This->nsuri, aPassword);
|
|
||||||
}
|
|
||||||
|
|
||||||
FIXME("default action not implemented\n");
|
nsACString_GetData(aPassword, &passa);
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
pass = heap_strdupAtoW(passa);
|
||||||
|
if(!pass)
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
hres = IUriBuilder_SetPassword(This->uri_builder, pass);
|
||||||
|
heap_free(pass);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
|
||||||
|
sync_wine_url(This);
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsresult NSAPI nsURI_GetHostPort(nsIURL *iface, nsACString *aHostPort)
|
static nsresult NSAPI nsURI_GetHostPort(nsIURL *iface, nsACString *aHostPort)
|
||||||
|
|
Loading…
Reference in New Issue