From 12cfe9827fb6d4a4c427552a0e2de6bc43269268 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 16 May 2006 03:02:28 +0000 Subject: [PATCH] Remove the keyword: protocol handler. Expose the functionality on nsIURIFixup instead. Bug 337339 and bug 264830, r=biesi, sr=darin git-svn-id: svn://10.0.0.236/trunk@196633 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/configure.in | 2 +- mozilla/docshell/base/nsDefaultURIFixup.cpp | 63 +++++- mozilla/docshell/base/nsIURIFixup.idl | 11 +- mozilla/docshell/base/nsWebShell.cpp | 8 +- mozilla/netwerk/build/nsNetModule.cpp | 13 -- mozilla/netwerk/necko-config.h.in | 1 - mozilla/netwerk/protocol/Makefile.in | 1 - mozilla/netwerk/protocol/keyword/Makefile.in | 48 ----- .../netwerk/protocol/keyword/src/Makefile.in | 63 ------ .../protocol/keyword/src/nsKeywordModule.cpp | 49 ----- .../keyword/src/nsKeywordProtocolHandler.cpp | 203 ------------------ .../keyword/src/nsKeywordProtocolHandler.h | 68 ------ .../resources/locale/en-US/region.properties | 4 - 13 files changed, 72 insertions(+), 462 deletions(-) delete mode 100644 mozilla/netwerk/protocol/keyword/Makefile.in delete mode 100644 mozilla/netwerk/protocol/keyword/src/Makefile.in delete mode 100644 mozilla/netwerk/protocol/keyword/src/nsKeywordModule.cpp delete mode 100644 mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp delete mode 100644 mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.h diff --git a/mozilla/configure.in b/mozilla/configure.in index e3007d05927..eb69556059b 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -4061,7 +4061,7 @@ MOZ_XUL=1 NS_PRINTING=1 NECKO_COOKIES=1 NECKO_DISK_CACHE=1 -NECKO_PROTOCOLS_DEFAULT="about data file ftp gopher http keyword res viewsource" +NECKO_PROTOCOLS_DEFAULT="about data file ftp gopher http res viewsource" NECKO_SMALL_BUFFERS= SUNCTL= JS_STATIC_BUILD= diff --git a/mozilla/docshell/base/nsDefaultURIFixup.cpp b/mozilla/docshell/base/nsDefaultURIFixup.cpp index 4e0cf4e36ba..5a3112996e0 100644 --- a/mozilla/docshell/base/nsDefaultURIFixup.cpp +++ b/mozilla/docshell/base/nsDefaultURIFixup.cpp @@ -340,6 +340,65 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, PRUint32 aFixupF return rv; } +static nsresult MangleKeywordIntoURI(const char *aKeyword, const char *aURL, + nsCString& query) +{ + char * unescaped = nsCRT::strdup(aKeyword); + if(unescaped == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + + // XXX this doesn't play nicely w/ i18n URLs + nsUnescape(unescaped); + + // pull out the "go" action word, or '?', if any + char one = unescaped[0], two = unescaped[1]; + if (one == '?') { // "?blah" + query = unescaped+1; + } else if ( (one == 'g' || one == 'G') // + && // + (two == 'o' || two == 'O') // "g[G]o[O] blah" + && // + (unescaped[2] == ' ') ) { // + + query = unescaped+3; + } else { + query = unescaped; + } + + nsMemory::Free(unescaped); + + query.Trim(" "); // pull leading/trailing spaces. + + // encode + char * encQuery = nsEscape(query.get(), url_Path); + if (!encQuery) return NS_ERROR_OUT_OF_MEMORY; + query.Adopt(encQuery); + + // prepend the query with the keyword url + // XXX this url should come from somewhere else + query.Insert(aURL, 0); + return NS_OK; +} + +NS_IMETHODIMP nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword, + nsIURI **aURI) +{ + *aURI = nsnull; + NS_ENSURE_STATE(mPrefBranch); + + nsXPIDLCString url; + mPrefBranch->GetCharPref("keyword.URL", getter_Copies(url)); + // if we can't find a keyword.URL keywords won't work. + if (url.IsEmpty()) + return NS_ERROR_NOT_AVAILABLE; + + nsCAutoString spec; + nsresult rv = MangleKeywordIntoURI(PromiseFlatCString(aKeyword).get(), + url.get(), spec); + if (NS_FAILED(rv)) return rv; + + return NS_NewURI(aURI, spec); +} PRBool nsDefaultURIFixup::MakeAlternateURI(nsIURI *aURI) { @@ -723,9 +782,7 @@ nsresult nsDefaultURIFixup::KeywordURIFixup(const nsACString & aURIString, (spaceLoc > 0 && (qMarkLoc == kNotFound || spaceLoc < qMarkLoc)) || qMarkLoc == 0) { - nsCAutoString keywordSpec("keyword:"); - keywordSpec.Append(aURIString); - NS_NewURI(aURI, keywordSpec); + KeywordToURI(aURIString, aURI); } if(*aURI) diff --git a/mozilla/docshell/base/nsIURIFixup.idl b/mozilla/docshell/base/nsIURIFixup.idl index 0e40b9835f8..f6609c37e3d 100644 --- a/mozilla/docshell/base/nsIURIFixup.idl +++ b/mozilla/docshell/base/nsIURIFixup.idl @@ -1,4 +1,4 @@ -/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -44,7 +44,7 @@ interface nsIURI; /** * Interface implemented by objects capable of fixing up strings into URIs */ -[scriptable, uuid(2EFD4A40-A5E1-11d4-9589-0020183BF181)] +[scriptable, uuid(773081ac-9f81-4bdb-9e7a-5e87b4361f09)] interface nsIURIFixup : nsISupports { /** No fixup flags. */ @@ -84,5 +84,12 @@ interface nsIURIFixup : nsISupports * @param aFixupFlags Flags that govern ways the URI may be fixed up. */ nsIURI createFixupURI(in AUTF8String aURIText, in unsigned long aFixupFlags); + + /** + * Converts the specified keyword string into a URI. Note that it's the + * caller's responsibility to check whether keywords are enabled and + * whether aKeyword is a sensible keyword. + */ + nsIURI keywordToURI(in AUTF8String aKeyword); }; diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 1c4c477d2e5..e6c2c40b882 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -942,7 +942,6 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress, if(keywordsEnabled && (kNotFound == dotLoc)) { // only send non-qualified hosts to the keyword server - nsCAutoString keywordSpec("keyword:"); // // If this string was passed through nsStandardURL by chance, then it // may have been converted from UTF-8 to ACE, which would result in a @@ -960,12 +959,9 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress, if (idnSrv && NS_SUCCEEDED(idnSrv->IsACE(host, &isACE)) && isACE && NS_SUCCEEDED(idnSrv->ConvertACEtoUTF8(host, utf8Host))) - keywordSpec.Append(utf8Host); + sURIFixup->KeywordToURI(utf8Host, getter_AddRefs(newURI)); else - keywordSpec.Append(host); - - NS_NewURI(getter_AddRefs(newURI), - keywordSpec, nsnull); + sURIFixup->KeywordToURI(host, getter_AddRefs(newURI)); } // end keywordsEnabled } diff --git a/mozilla/netwerk/build/nsNetModule.cpp b/mozilla/netwerk/build/nsNetModule.cpp index 7aa294ce6db..14a3802db68 100644 --- a/mozilla/netwerk/build/nsNetModule.cpp +++ b/mozilla/netwerk/build/nsNetModule.cpp @@ -231,10 +231,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewSourceURI) #include "nsDataHandler.h" #endif -#ifdef NECKO_PROTOCOL_keyword -#include "nsKeywordProtocolHandler.h" -#endif - /////////////////////////////////////////////////////////////////////////////// #include "nsURIChecker.h" @@ -1108,15 +1104,6 @@ static const nsModuleComponentInfo gNetModuleInfo[] = { nsDataHandler::Create}, #endif -#ifdef NECKO_PROTOCOL_keyword - // from netwerk/protocol/keyword: - { "The Keyword Protocol Handler", - NS_KEYWORDPROTOCOLHANDLER_CID, - NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "keyword", - nsKeywordProtocolHandler::Create - }, -#endif - #ifdef NECKO_PROTOCOL_viewsource // from netwerk/protocol/viewsource: { "The ViewSource Protocol Handler", diff --git a/mozilla/netwerk/necko-config.h.in b/mozilla/netwerk/necko-config.h.in index bb8299fd16b..b0dabe9c0fe 100644 --- a/mozilla/netwerk/necko-config.h.in +++ b/mozilla/netwerk/necko-config.h.in @@ -49,7 +49,6 @@ #undef NECKO_PROTOCOL_ftp #undef NECKO_PROTOCOL_gopher #undef NECKO_PROTOCOL_http -#undef NECKO_PROTOCOL_keyword #undef NECKO_PROTOCOL_res #undef NECKO_PROTOCOL_viewsource diff --git a/mozilla/netwerk/protocol/Makefile.in b/mozilla/netwerk/protocol/Makefile.in index 89e07984bb2..6bbcbba3c62 100644 --- a/mozilla/netwerk/protocol/Makefile.in +++ b/mozilla/netwerk/protocol/Makefile.in @@ -44,7 +44,6 @@ include $(DEPTH)/config/autoconf.mk DIRS = about \ data \ - keyword \ res \ file \ http \ diff --git a/mozilla/netwerk/protocol/keyword/Makefile.in b/mozilla/netwerk/protocol/keyword/Makefile.in deleted file mode 100644 index 7a1c4af94d7..00000000000 --- a/mozilla/netwerk/protocol/keyword/Makefile.in +++ /dev/null @@ -1,48 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# 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/ -# -# 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. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# 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 -# use your version of this file under the terms of the MPL, indicate your -# 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 -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -DIRS = src - -include $(topsrcdir)/config/rules.mk - diff --git a/mozilla/netwerk/protocol/keyword/src/Makefile.in b/mozilla/netwerk/protocol/keyword/src/Makefile.in deleted file mode 100644 index 2f148a62235..00000000000 --- a/mozilla/netwerk/protocol/keyword/src/Makefile.in +++ /dev/null @@ -1,63 +0,0 @@ -# -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# 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/ -# -# 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. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is -# 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 -# use your version of this file under the terms of the MPL, indicate your -# 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 -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -DEPTH = ../../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = necko -LIBRARY_NAME = nkkeyword_s -LIBXUL_LIBRARY = 1 - -REQUIRES = xpcom \ - string \ - pref \ - $(NULL) - -CPPSRCS = \ - nsKeywordProtocolHandler.cpp \ - $(NULL) - -# we don't want the shared lib, but we want to force the creation of a -# static lib. -FORCE_STATIC_LIB = 1 - -include $(topsrcdir)/config/rules.mk - diff --git a/mozilla/netwerk/protocol/keyword/src/nsKeywordModule.cpp b/mozilla/netwerk/protocol/keyword/src/nsKeywordModule.cpp deleted file mode 100644 index 1c85ab0bfed..00000000000 --- a/mozilla/netwerk/protocol/keyword/src/nsKeywordModule.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * 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/ - * - * 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. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * 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 - * use your version of this file under the terms of the MPL, indicate your - * 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 - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsIGenericFactory.h" -#include "nsKeywordProtocolHandler.h" - -static const nsModuleComponentInfo gResComponents[] = { - { "The Keyword Protocol Handler", - NS_KEYWORDPROTOCOLHANDLER_CID, - NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "keyword", - nsKeywordProtocolHandler::Create - } -}; - -NS_IMPL_NSGETMODULE(keyword, gResComponents) diff --git a/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp b/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp deleted file mode 100644 index 237d05d469d..00000000000 --- a/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * 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/ - * - * 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. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * 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 - * use your version of this file under the terms of the MPL, indicate your - * 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 - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsKeywordProtocolHandler.h" -#include "nsIURL.h" -#include "nsIIOService.h" -#include "nsCRT.h" -#include "nsIComponentManager.h" -#include "nsIServiceManager.h" -#include "nsEscape.h" -#include "nsIPrefService.h" -#include "nsIPrefBranch.h" -#include "nsXPIDLString.h" -#include "nsReadableUtils.h" -#include "nsNetUtil.h" - -static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID); - -//////////////////////////////////////////////////////////////////////////////// - -nsKeywordProtocolHandler::nsKeywordProtocolHandler() { -} - -nsKeywordProtocolHandler::~nsKeywordProtocolHandler() { -} - -NS_IMPL_ISUPPORTS1(nsKeywordProtocolHandler, nsIProtocolHandler) - -NS_METHOD -nsKeywordProtocolHandler::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { - if (aOuter) - return NS_ERROR_NO_AGGREGATION; - - nsKeywordProtocolHandler* ph = new nsKeywordProtocolHandler(); - if (ph == nsnull) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(ph); - nsresult rv = ph->QueryInterface(aIID, aResult); - NS_RELEASE(ph); - return rv; -} - -//////////////////////////////////////////////////////////////////////////////// -// nsIProtocolHandler methods: - -NS_IMETHODIMP -nsKeywordProtocolHandler::GetScheme(nsACString &result) { - result.AssignLiteral("keyword"); - return NS_OK; -} - -NS_IMETHODIMP -nsKeywordProtocolHandler::GetDefaultPort(PRInt32 *result) { - *result = -1; - return NS_OK; -} - -NS_IMETHODIMP -nsKeywordProtocolHandler::GetProtocolFlags(PRUint32 *result) { - *result = URI_NORELATIVE | URI_NOAUTH; - return NS_OK; -} - -// digests a spec _without_ the preceeding "keyword:" scheme. -static char * -MangleKeywordIntoHTTPURL(const char *aSpec, const char *aHTTPURL) { - char * unescaped = nsCRT::strdup(aSpec); - if(unescaped == nsnull) - return nsnull; - - // XXX this doesn't play nicely w/ i18n URLs - nsUnescape(unescaped); - - // build up a request to the keyword server. - nsCAutoString query; - - // pull out the "go" action word, or '?', if any - char one = unescaped[0], two = unescaped[1]; - if (one == '?') { // "?blah" - query = unescaped+1; - } else if ( (one == 'g' || one == 'G') // - && // - (two == 'o' || two == 'O') // "g[G]o[O] blah" - && // - (unescaped[2] == ' ') ) { // - - query = unescaped+3; - } else { - query = unescaped; - } - - nsMemory::Free(unescaped); - - query.Trim(" "); // pull leading/trailing spaces. - - // encode - char * encQuery = nsEscape(query.get(), url_Path); - if (!encQuery) return nsnull; - query = encQuery; - nsMemory::Free(encQuery); - - // prepend the query with the keyword url - // XXX this url should come from somewhere else - query.Insert(aHTTPURL, 0); - - return ToNewCString(query); -} - -// digests a spec of the form "keyword:blah" -NS_IMETHODIMP -nsKeywordProtocolHandler::NewURI(const nsACString &aSpec, - const char *aCharset, // ignore charset info - nsIURI *aBaseURI, - nsIURI **result) -{ - nsIURI* uri; - nsresult rv = CallCreateInstance(kSimpleURICID, &uri); - if (NS_FAILED(rv)) return rv; - - rv = uri->SetSpec(aSpec); - if (NS_FAILED(rv)) { - NS_RELEASE(uri); - return rv; - } - - *result = uri; - return rv; -} - -NS_IMETHODIMP -nsKeywordProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result) -{ - NS_ENSURE_ARG_POINTER(uri); - nsresult rv; - nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); - if (NS_FAILED(rv)) return rv; - - nsXPIDLCString url; - rv = prefs->GetCharPref("keyword.URL", getter_Copies(url)); - // if we can't find a keyword.URL keywords won't work. - if (url.IsEmpty()) - return NS_ERROR_FAILURE; - - nsCAutoString path; - rv = uri->GetPath(path); - if (NS_FAILED(rv)) return rv; - - char *httpSpec = MangleKeywordIntoHTTPURL(path.get(), url.get()); - if (!httpSpec) return NS_ERROR_OUT_OF_MEMORY; - - // now we have an HTTP url, give the user an HTTP channel - nsCOMPtr serv(do_GetIOService(&rv)); - if (NS_SUCCEEDED(rv)) - rv = serv->NewChannel(nsDependentCString(httpSpec), nsnull, nsnull, result); - - nsMemory::Free(httpSpec); - return rv; - -} - -NS_IMETHODIMP -nsKeywordProtocolHandler::AllowPort(PRInt32 port, const char *scheme, PRBool *_retval) -{ - // don't override anything. - *_retval = PR_FALSE; - return NS_OK; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.h b/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.h deleted file mode 100644 index fdc128f3454..00000000000 --- a/mozilla/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * 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/ - * - * 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. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * 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 - * use your version of this file under the terms of the MPL, indicate your - * 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 - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nsKeywordProtocolHandler_h___ -#define nsKeywordProtocolHandler_h___ - -#include "nsIProtocolHandler.h" -#include "nsString.h" - -#define NS_KEYWORDPROTOCOLHANDLER_CID \ -{ /* 2E4233C0-6FB4-11d3-A180-0050041CAF44 */ \ - 0x2e4233c0, \ - 0x6fb4, \ - 0x11d3, \ - {0xa1, 0x80, 0x00, 0x50, 0x4, 0x1c, 0xaf, 0x44} \ -} - -class nsKeywordProtocolHandler : public nsIProtocolHandler -{ -public: - NS_DECL_ISUPPORTS - - // nsIProtocolHandler methods: - NS_DECL_NSIPROTOCOLHANDLER - - // nsKeywordProtocolHandler methods: - nsKeywordProtocolHandler(); - virtual ~nsKeywordProtocolHandler(); - - static NS_METHOD - Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); -}; - -#endif /* nsKeywordProtocolHandler_h___ */ diff --git a/mozilla/xpfe/browser/resources/locale/en-US/region.properties b/mozilla/xpfe/browser/resources/locale/en-US/region.properties index 089b0a97746..721d457e9fa 100644 --- a/mozilla/xpfe/browser/resources/locale/en-US/region.properties +++ b/mozilla/xpfe/browser/resources/locale/en-US/region.properties @@ -1,11 +1,7 @@ # navigator.properties homePageDefault=http://www.mozilla.org/ -shopKeyword=keyword:shop [Product] -quoteKeyword=keyword:quote [Enter symbol here] -localKeyword=keyword:zip [Your zip code] keywordList=http://home.netscape.com/escapes/keywords webmailKeyword=http://webmail.netscape.com -careerKeyword=keyword:[Your city] careers fallbackDefaultSearchURL=http://www.google.com/search?q= otherSearchURL=http://www.google.com #