mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
part of fix for #46488 - http startup handlers get an Observe() call as well
r=valeski, sr=waterson
This commit is contained in:
parent
fed9703e2b
commit
19bc55bf31
@ -175,4 +175,5 @@ interface nsIHTTPProtocolHandler : nsIProtocolHandler
|
||||
// HTTP protocol handler will do_GetService() each CID or Contractid that is registered
|
||||
// under this category when it comes alive.
|
||||
#define NS_HTTP_STARTUP_CATEGORY "http-startup-category"
|
||||
#define NS_HTTP_STARTUP_TOPIC (NS_LITERAL_STRING("http-startup").get())
|
||||
%}
|
||||
|
@ -124,8 +124,8 @@ nsHTTPHandler::GetScheme(char * *o_Scheme)
|
||||
* @category: Input category
|
||||
* @return: returns error if any CID or ContractID registered failed to create.
|
||||
*/
|
||||
static nsresult
|
||||
CategoryCreateService( const char *category )
|
||||
nsresult
|
||||
nsHTTPHandler::CategoryCreateService(const char *category)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
@ -173,6 +173,13 @@ CategoryCreateService( const char *category )
|
||||
{
|
||||
nFailed++;
|
||||
}
|
||||
|
||||
// try an observer, if it implements it.
|
||||
nsCOMPtr<nsIObserver> observer = do_QueryInterface(instance, &rv);
|
||||
if (NS_SUCCEEDED(rv) && observer)
|
||||
observer->Observe(NS_STATIC_CAST(nsISupports*,NS_STATIC_CAST(void*,this)),
|
||||
NS_HTTP_STARTUP_TOPIC,
|
||||
NS_LITERAL_STRING("").get());
|
||||
}
|
||||
return (nFailed ? NS_ERROR_FAILURE : NS_OK);
|
||||
}
|
||||
|
@ -200,6 +200,8 @@ private:
|
||||
|
||||
PRUint32 getCapabilities (const char *host, PRInt32 port, PRUint32 cap);
|
||||
void setCapabilities (nsIChannel* i_pTrans, PRUint32 aCapabilities);
|
||||
nsresult CategoryCreateService(const char *category);
|
||||
|
||||
PRBool mProxySSLConnectAllowed;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user