2003-03-22 01:24:51 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2001-09-25 23:31:24 +00:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 22:14:17 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2001-03-29 02:11:48 +00:00
|
|
|
*
|
2004-04-18 22:14:17 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2001-09-25 23:31:24 +00:00
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
2001-03-29 02:11:48 +00:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 22:14:17 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-25 23:31:24 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 22:14:17 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-25 23:31:24 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 22:14:17 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-03-29 02:11:48 +00:00
|
|
|
*
|
2001-09-25 23:31:24 +00:00
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2001-03-29 02:11:48 +00:00
|
|
|
|
|
|
|
#include "nsImgManager.h"
|
2001-06-05 21:37:48 +00:00
|
|
|
#include "nsIDocument.h"
|
|
|
|
#include "nsIContent.h"
|
2003-04-25 20:03:40 +00:00
|
|
|
#include "nsINodeInfo.h"
|
2001-06-05 21:37:48 +00:00
|
|
|
#include "nsIURI.h"
|
2001-10-19 02:28:06 +00:00
|
|
|
#include "nsIServiceManager.h"
|
2002-05-31 18:40:39 +00:00
|
|
|
#include "nsIScriptGlobalObject.h"
|
2004-03-13 18:11:01 +00:00
|
|
|
#include "nsIDOMDocument.h"
|
2002-05-31 18:40:39 +00:00
|
|
|
#include "nsIDocShellTreeItem.h"
|
2003-11-11 02:46:06 +00:00
|
|
|
#include "nsIPrefService.h"
|
|
|
|
#include "nsIPrefBranch.h"
|
2003-03-22 01:24:51 +00:00
|
|
|
#include "nsIPrefBranchInternal.h"
|
2003-11-11 02:46:06 +00:00
|
|
|
#include "nsIDocShell.h"
|
2003-03-26 07:41:30 +00:00
|
|
|
#include "nsString.h"
|
2004-05-13 18:34:18 +00:00
|
|
|
#include "nsContentPolicyUtils.h"
|
2001-10-19 02:28:06 +00:00
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
// Possible behavior pref values
|
|
|
|
#define IMAGE_ACCEPT 0
|
|
|
|
#define IMAGE_NOFOREIGN 1
|
|
|
|
#define IMAGE_DENY 2
|
2002-05-31 18:40:39 +00:00
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
static const char kImageBehaviorPrefName[] = "network.image.imageBehavior";
|
|
|
|
static const char kImageWarningPrefName[] = "network.image.warnAboutImages";
|
|
|
|
static const char kImageBlockImageInMailNewsPrefName[] = "mailnews.message_display.disable_remote_image";
|
2001-03-29 02:11:48 +00:00
|
|
|
|
2003-11-11 02:46:06 +00:00
|
|
|
static const PRUint8 kImageBehaviorPrefDefault = IMAGE_ACCEPT;
|
|
|
|
static const PRPackedBool kImageWarningPrefDefault = PR_FALSE;
|
|
|
|
static const PRPackedBool kImageBlockImageInMailNewsPrefDefault = PR_FALSE;
|
|
|
|
|
2001-03-29 02:11:48 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// nsImgManager Implementation
|
2003-03-22 01:24:51 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2001-03-29 02:11:48 +00:00
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
NS_IMPL_ISUPPORTS4(nsImgManager,
|
2001-06-05 21:37:48 +00:00
|
|
|
nsIImgManager,
|
2003-03-22 01:24:51 +00:00
|
|
|
nsIContentPolicy,
|
|
|
|
nsIObserver,
|
2003-09-07 22:05:34 +00:00
|
|
|
nsSupportsWeakReference)
|
2001-03-29 02:11:48 +00:00
|
|
|
|
|
|
|
nsImgManager::nsImgManager()
|
2003-11-11 02:46:06 +00:00
|
|
|
: mBehaviorPref(kImageBehaviorPrefDefault)
|
|
|
|
, mWarningPref(kImageWarningPrefDefault)
|
|
|
|
, mBlockInMailNewsPref(kImageBlockImageInMailNewsPrefDefault)
|
2001-03-29 02:11:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
nsImgManager::~nsImgManager()
|
2001-03-29 02:11:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult nsImgManager::Init()
|
|
|
|
{
|
2003-03-22 01:24:51 +00:00
|
|
|
// On error, just don't use the host based lookup anymore. We can do the
|
|
|
|
// other things, like mailnews blocking
|
|
|
|
mPermissionManager = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
|
2001-03-29 02:11:48 +00:00
|
|
|
|
2004-01-28 23:45:17 +00:00
|
|
|
nsCOMPtr<nsIPrefBranchInternal> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
2003-11-11 02:46:06 +00:00
|
|
|
if (prefBranch) {
|
2004-01-28 23:45:17 +00:00
|
|
|
prefBranch->AddObserver(kImageBehaviorPrefName, this, PR_TRUE);
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2004-01-28 23:45:17 +00:00
|
|
|
// We don't do anything with it yet, but let it be. (bug 110112, 146513)
|
|
|
|
prefBranch->AddObserver(kImageWarningPrefName, this, PR_TRUE);
|
|
|
|
|
|
|
|
prefBranch->AddObserver(kImageBlockImageInMailNewsPrefName, this, PR_TRUE);
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2003-11-11 02:46:06 +00:00
|
|
|
PrefChanged(prefBranch, nsnull);
|
2003-03-22 01:24:51 +00:00
|
|
|
}
|
2001-06-05 21:37:48 +00:00
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
return NS_OK;
|
|
|
|
}
|
2002-05-31 18:40:39 +00:00
|
|
|
|
2003-11-11 02:46:06 +00:00
|
|
|
void
|
|
|
|
nsImgManager::PrefChanged(nsIPrefBranch *aPrefBranch,
|
|
|
|
const char *aPref)
|
|
|
|
{
|
|
|
|
PRBool val;
|
|
|
|
|
|
|
|
#define PREF_CHANGED(_P) (!aPref || !strcmp(aPref, _P))
|
|
|
|
|
|
|
|
if (PREF_CHANGED(kImageBehaviorPrefName) &&
|
|
|
|
NS_SUCCEEDED(aPrefBranch->GetIntPref(kImageBehaviorPrefName, &val)) &&
|
|
|
|
val >= 0 && val <= 2)
|
|
|
|
mBehaviorPref = val;
|
|
|
|
|
|
|
|
if (PREF_CHANGED(kImageWarningPrefName) &&
|
|
|
|
NS_SUCCEEDED(aPrefBranch->GetBoolPref(kImageWarningPrefName, &val)))
|
|
|
|
mWarningPref = val;
|
|
|
|
|
|
|
|
if (PREF_CHANGED(kImageBlockImageInMailNewsPrefName) &&
|
|
|
|
NS_SUCCEEDED(aPrefBranch->GetBoolPref(kImageBlockImageInMailNewsPrefName, &val)))
|
|
|
|
mBlockInMailNewsPref = val;
|
|
|
|
}
|
|
|
|
|
2004-05-13 18:34:18 +00:00
|
|
|
/**
|
2004-07-27 17:15:53 +00:00
|
|
|
* Helper function to get the root DocShell given a context
|
2004-05-13 18:34:18 +00:00
|
|
|
*
|
2004-07-27 17:15:53 +00:00
|
|
|
* @param aContext The context (can be null)
|
|
|
|
* @return the root DocShell containing aContext, if found
|
2004-05-13 18:34:18 +00:00
|
|
|
*/
|
|
|
|
static inline already_AddRefed<nsIDocShell>
|
2004-07-27 17:15:53 +00:00
|
|
|
GetRootDocShell(nsISupports *context)
|
2004-05-13 18:34:18 +00:00
|
|
|
{
|
2004-07-27 17:15:53 +00:00
|
|
|
nsIDocShell *docshell = NS_CP_GetDocShellFromContext(context);
|
2004-05-13 18:34:18 +00:00
|
|
|
if (!docshell)
|
|
|
|
return nsnull;
|
|
|
|
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIDocShellTreeItem> docshellTreeItem(do_QueryInterface(docshell, &rv));
|
|
|
|
if (NS_FAILED(rv))
|
|
|
|
return nsnull;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDocShellTreeItem> rootItem;
|
|
|
|
// we want the app docshell, so don't use GetSameTypeRootTreeItem
|
|
|
|
rv = docshellTreeItem->GetRootTreeItem(getter_AddRefs(rootItem));
|
|
|
|
if (NS_FAILED(rv))
|
|
|
|
return nsnull;
|
|
|
|
|
|
|
|
nsIDocShell *result;
|
|
|
|
CallQueryInterface(rootItem, &result);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2001-06-05 21:37:48 +00:00
|
|
|
// nsIContentPolicy Implementation
|
2004-05-13 18:34:18 +00:00
|
|
|
NS_IMETHODIMP nsImgManager::ShouldLoad(PRUint32 aContentType,
|
|
|
|
nsIURI *aContentLocation,
|
|
|
|
nsIURI *aRequestingLocation,
|
2004-07-27 17:15:53 +00:00
|
|
|
nsISupports *aRequestingContext,
|
2004-05-13 18:34:18 +00:00
|
|
|
const nsACString &aMimeGuess,
|
|
|
|
nsISupports *aExtra,
|
|
|
|
PRInt16 *aDecision)
|
2001-06-05 21:37:48 +00:00
|
|
|
{
|
2004-05-13 18:34:18 +00:00
|
|
|
*aDecision = nsIContentPolicy::ACCEPT;
|
|
|
|
nsresult rv;
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2004-03-13 18:11:01 +00:00
|
|
|
// we can't do anything w/ out this
|
2004-05-13 18:34:18 +00:00
|
|
|
if (!aContentLocation)
|
|
|
|
return NS_OK;
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2004-05-13 18:34:18 +00:00
|
|
|
if (aContentType == nsIContentPolicy::TYPE_IMAGE) {
|
2003-04-30 06:28:16 +00:00
|
|
|
// we only want to check http, https, ftp
|
2004-05-13 18:34:18 +00:00
|
|
|
// remember ftp for a later check (disabling ftp images from mailnews)
|
2003-04-30 06:28:16 +00:00
|
|
|
PRBool isFtp;
|
2004-05-13 18:34:18 +00:00
|
|
|
rv = aContentLocation->SchemeIs("ftp", &isFtp);
|
2003-04-25 23:29:17 +00:00
|
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
|
2003-04-30 06:28:16 +00:00
|
|
|
PRBool needToCheck = isFtp;
|
|
|
|
if (!needToCheck) {
|
2004-05-13 18:34:18 +00:00
|
|
|
rv = aContentLocation->SchemeIs("http", &needToCheck);
|
2003-04-30 06:28:16 +00:00
|
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
2003-04-25 23:29:17 +00:00
|
|
|
|
2003-04-30 06:28:16 +00:00
|
|
|
if (!needToCheck) {
|
2004-05-13 18:34:18 +00:00
|
|
|
rv = aContentLocation->SchemeIs("https", &needToCheck);
|
2003-04-30 06:28:16 +00:00
|
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
}
|
|
|
|
}
|
2003-04-25 23:29:17 +00:00
|
|
|
|
2003-04-30 06:28:16 +00:00
|
|
|
// for chrome:// and resources and others, no need to check.
|
|
|
|
if (!needToCheck)
|
2003-04-25 23:29:17 +00:00
|
|
|
return NS_OK;
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2004-07-27 17:15:53 +00:00
|
|
|
nsCOMPtr<nsIDocShell> docshell(GetRootDocShell(aRequestingContext));
|
2004-03-13 18:11:01 +00:00
|
|
|
if (docshell) {
|
|
|
|
PRUint32 appType;
|
|
|
|
rv = docshell->GetAppType(&appType);
|
|
|
|
if (NS_SUCCEEDED(rv) && appType == nsIDocShell::APP_TYPE_MAIL) {
|
|
|
|
// never allow ftp for mail messages,
|
|
|
|
// because we don't want to send the users email address
|
|
|
|
// as the anonymous password
|
|
|
|
if (mBlockInMailNewsPref || isFtp) {
|
2004-05-13 18:34:18 +00:00
|
|
|
*aDecision = nsIContentPolicy::REJECT_REQUEST;
|
2004-03-13 18:11:01 +00:00
|
|
|
return NS_OK;
|
2001-06-05 21:37:48 +00:00
|
|
|
}
|
2003-03-22 01:24:51 +00:00
|
|
|
}
|
2001-06-05 21:37:48 +00:00
|
|
|
}
|
2004-03-13 18:11:01 +00:00
|
|
|
|
2004-05-13 18:34:18 +00:00
|
|
|
PRBool shouldLoad;
|
|
|
|
rv = TestPermission(aContentLocation, aRequestingLocation, &shouldLoad);
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
if (!shouldLoad)
|
|
|
|
*aDecision = nsIContentPolicy::REJECT_REQUEST;
|
2003-03-22 01:24:51 +00:00
|
|
|
}
|
|
|
|
return NS_OK;
|
2001-03-29 02:11:48 +00:00
|
|
|
}
|
|
|
|
|
2004-05-13 18:34:18 +00:00
|
|
|
NS_IMETHODIMP nsImgManager::ShouldProcess(PRUint32 aContentType,
|
|
|
|
nsIURI *aContentLocation,
|
|
|
|
nsIURI *aRequestingLocation,
|
2004-07-27 17:15:53 +00:00
|
|
|
nsISupports *aRequestingContext,
|
2004-05-13 18:34:18 +00:00
|
|
|
const nsACString &aMimeGuess,
|
|
|
|
nsISupports *aExtra,
|
|
|
|
PRInt16 *aDecision)
|
2003-03-22 01:24:51 +00:00
|
|
|
{
|
2004-07-27 17:15:53 +00:00
|
|
|
// For loads where aRequestingContext is chrome, we should just
|
|
|
|
// accept. Those are most likely toplevel loads in windows, and
|
|
|
|
// chrome generally knows what it's doing anyway.
|
2004-07-18 19:40:44 +00:00
|
|
|
nsCOMPtr<nsIDocShellTreeItem> item =
|
2004-07-27 17:15:53 +00:00
|
|
|
do_QueryInterface(NS_CP_GetDocShellFromContext(aRequestingContext));
|
2004-07-18 19:40:44 +00:00
|
|
|
|
|
|
|
if (item) {
|
|
|
|
PRInt32 type;
|
|
|
|
item->GetItemType(&type);
|
|
|
|
if (type == nsIDocShellTreeItem::typeChrome) {
|
|
|
|
*aDecision = nsIContentPolicy::ACCEPT;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// This isn't a load from chrome. Just do a ShouldLoad() check --
|
|
|
|
// we want the same answer here
|
|
|
|
return ShouldLoad(aContentType, aContentLocation, aRequestingLocation,
|
2004-07-27 17:15:53 +00:00
|
|
|
aRequestingContext, aMimeGuess, aExtra, aDecision);
|
2001-03-29 02:11:48 +00:00
|
|
|
}
|
2002-05-31 18:40:39 +00:00
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
NS_IMETHODIMP
|
|
|
|
nsImgManager::TestPermission(nsIURI *aCurrentURI,
|
|
|
|
nsIURI *aFirstURI,
|
|
|
|
PRBool *aPermission)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
*aPermission = PR_TRUE;
|
|
|
|
|
2003-08-02 17:20:52 +00:00
|
|
|
// check the permission list first; if we find an entry, it overrides
|
|
|
|
// default prefs. this is new behavior, see bug 184059.
|
|
|
|
if (mPermissionManager) {
|
|
|
|
PRUint32 temp;
|
|
|
|
mPermissionManager->TestPermission(aCurrentURI, "image", &temp);
|
|
|
|
|
|
|
|
// if we found an entry, use it
|
|
|
|
if (temp != nsIPermissionManager::UNKNOWN_ACTION) {
|
|
|
|
*aPermission = (temp != nsIPermissionManager::DENY_ACTION);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
if (mBehaviorPref == IMAGE_DENY) {
|
|
|
|
*aPermission = PR_FALSE;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Third party checking
|
|
|
|
if (mBehaviorPref == IMAGE_NOFOREIGN) {
|
2004-08-01 22:38:10 +00:00
|
|
|
// We need a requesting uri for third party checks to work.
|
|
|
|
if (!aFirstURI)
|
|
|
|
return NS_OK;
|
|
|
|
|
2004-09-02 13:44:31 +00:00
|
|
|
PRBool trustedSource = PR_FALSE;
|
|
|
|
rv = aFirstURI->SchemeIs("chrome", &trustedSource);
|
|
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
if (!trustedSource) {
|
|
|
|
rv = aFirstURI->SchemeIs("resource", &trustedSource);
|
|
|
|
NS_ENSURE_SUCCESS(rv,rv);
|
|
|
|
}
|
|
|
|
if (trustedSource)
|
|
|
|
return NS_OK;
|
|
|
|
|
2003-03-22 01:24:51 +00:00
|
|
|
// compare tails of names checking to see if they have a common domain
|
|
|
|
// we do this by comparing the tails of both names where each tail
|
|
|
|
// includes at least one dot
|
|
|
|
|
|
|
|
// A more generic method somewhere would be nice
|
|
|
|
|
|
|
|
nsCAutoString currentHost;
|
|
|
|
rv = aCurrentURI->GetAsciiHost(currentHost);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// Search for two dots, starting at the end.
|
|
|
|
// If there are no two dots found, ++dot will turn to zero,
|
|
|
|
// that will return the entire string.
|
|
|
|
PRInt32 dot = currentHost.RFindChar('.');
|
|
|
|
dot = currentHost.RFindChar('.', dot-1);
|
|
|
|
++dot;
|
|
|
|
|
|
|
|
// Get the domain, ie the last part of the host (www.domain.com -> domain.com)
|
|
|
|
// This will break on co.uk
|
|
|
|
const nsACString &tail = Substring(currentHost, dot, currentHost.Length() - dot);
|
|
|
|
|
|
|
|
nsCAutoString firstHost;
|
|
|
|
rv = aFirstURI->GetAsciiHost(firstHost);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
2003-06-19 22:35:08 +00:00
|
|
|
|
|
|
|
// If the tail is longer then the whole firstHost, it will never match
|
|
|
|
if (firstHost.Length() < tail.Length()) {
|
|
|
|
*aPermission = PR_FALSE;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2003-03-22 01:24:51 +00:00
|
|
|
|
|
|
|
// Get the last part of the firstUri with the same length as |tail|
|
2003-06-19 22:35:08 +00:00
|
|
|
const nsACString &firstTail = Substring(firstHost, firstHost.Length() - tail.Length(), tail.Length());
|
2003-03-22 01:24:51 +00:00
|
|
|
|
|
|
|
// Check that both tails are the same, and that just before the tail in
|
|
|
|
// |firstUri| there is a dot. That means both url are in the same domain
|
2003-06-19 22:35:08 +00:00
|
|
|
if ((firstHost.Length() > tail.Length() &&
|
|
|
|
firstHost.CharAt(firstHost.Length() - tail.Length() - 1) != '.') ||
|
|
|
|
!tail.Equals(firstTail)) {
|
2003-03-22 01:24:51 +00:00
|
|
|
*aPermission = PR_FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2003-11-11 02:46:06 +00:00
|
|
|
nsImgManager::Observe(nsISupports *aSubject,
|
|
|
|
const char *aTopic,
|
2003-03-22 01:24:51 +00:00
|
|
|
const PRUnichar *aData)
|
|
|
|
{
|
2003-11-11 02:46:06 +00:00
|
|
|
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(aSubject);
|
|
|
|
NS_ASSERTION(!nsCRT::strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic),
|
|
|
|
"unexpected topic - we only deal with pref changes!");
|
2003-03-22 01:24:51 +00:00
|
|
|
|
2003-11-11 02:46:06 +00:00
|
|
|
if (prefBranch)
|
|
|
|
PrefChanged(prefBranch, NS_LossyConvertUTF16toASCII(aData).get());
|
2003-03-22 01:24:51 +00:00
|
|
|
return NS_OK;
|
|
|
|
}
|