Commit 07e1466a authored by sspitzer%mozilla.org's avatar sspitzer%mozilla.org
Browse files

fix for bug #341654: search bookmarks broken if you disable places. r=vlad

parent 0f25ce60
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -83,6 +83,12 @@ DIRS += \
        filepicker \
        $(NULL)

ifdef MOZ_PHOENIX
ifndef MOZ_PLACES
DIRS += search
endif
endif

ifndef MOZ_PHOENIX
ifndef MOZ_XULRUNNER
DIRS += \
+5 −1
Original line number Diff line number Diff line
@@ -62,10 +62,14 @@ REQUIRES = xpcom \
		  $(NULL)

CPPSRCS		= \
		nsInternetSearchService.cpp \
		nsLocalSearchService.cpp \
		nsSearchModule.cpp \
		$(NULL)

ifndef MOZ_PHOENIX
CPPSRCS += nsInternetSearchService.cpp
endif

include $(topsrcdir)/config/rules.mk

EXTRA_DSO_LDOPTS += \
+0 −18
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
 */

#include "nsInternetSearchService.h"
#include "nsLocalSearchService.h"

#include "nscore.h"
#include "nsIEnumerator.h"
@@ -51,7 +50,6 @@
#include "nsIServiceManager.h"
#include "nsVoidArray.h"  // XXX introduces dependency on raptorbase
#include "nsXPIDLString.h"
#include "nsRDFCID.h"
#include "plhash.h"
#include "plstr.h"
#include "prmem.h"
@@ -86,7 +84,6 @@
#include "nsUnicharUtils.h"
#include "nsReadableUtils.h"
#include "nsIPrefLocalizedString.h"
#include "nsIGenericFactory.h"

#ifdef  XP_WIN
#include "windef.h"
@@ -6310,18 +6307,3 @@ InternetSearchDataSource::Observe(nsISupports *aSubject, const char *aTopic, con
    return rv;
}
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init)

static const nsModuleComponentInfo components[] = {
    { "Local Search", NS_RDFFINDDATASOURCE_CID,
      NS_LOCALSEARCH_SERVICE_CONTRACTID, LocalSearchDataSourceConstructor },
    { "Local Search", NS_RDFFINDDATASOURCE_CID,
      NS_LOCALSEARCH_DATASOURCE_CONTRACTID, LocalSearchDataSourceConstructor },
    { "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
      NS_INTERNETSEARCH_SERVICE_CONTRACTID, InternetSearchDataSourceConstructor },
    { "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
      NS_INTERNETSEARCH_DATASOURCE_CONTRACTID, InternetSearchDataSourceConstructor },
};

NS_IMPL_NSGETMODULE(SearchServiceModule, components)
+64 −0
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
 * mozilla.org
 * Portions created by the Initial Developer are Copyright (C) 2006
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Seth Spitzer <sspitzer@mozilla.org> (original author)
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of 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 MOZ_PHOENIX
#include "nsInternetSearchService.h"
#endif
#include "nsLocalSearchService.h"
#include "nsIGenericFactory.h"
#include "nsRDFCID.h"

NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init)
#ifndef MOZ_PHOENIX
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init)
#endif

static const nsModuleComponentInfo components[] = {
    { "Local Search", NS_RDFFINDDATASOURCE_CID,
      NS_LOCALSEARCH_SERVICE_CONTRACTID, LocalSearchDataSourceConstructor },
    { "Local Search", NS_RDFFINDDATASOURCE_CID,
      NS_LOCALSEARCH_DATASOURCE_CONTRACTID, LocalSearchDataSourceConstructor },
#ifndef MOZ_PHOENIX
    { "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
      NS_INTERNETSEARCH_SERVICE_CONTRACTID, InternetSearchDataSourceConstructor },
    { "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
      NS_INTERNETSEARCH_DATASOURCE_CONTRACTID, InternetSearchDataSourceConstructor },
#endif
};

NS_IMPL_NSGETMODULE(SearchServiceModule, components)