Bug 567521: back out part of patch from
bug 560095 (changeset 79cbadb26768) to fix winEmbed bustage
--- a/profile/dirserviceprovider/src/nsProfileDirServiceProvider.cpp
+++ b/profile/dirserviceprovider/src/nsProfileDirServiceProvider.cpp
@@ -40,17 +40,16 @@
#include "nsProfileStringTypes.h"
#include "nsProfileLock.h"
#include "nsILocalFile.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsISupportsUtils.h"
#include "nsISimpleEnumerator.h"
#include "nsIObserverService.h"
-#include "mozilla/Services.h"
// File Name Defines
#define PREFS_FILE_50_NAME NS_LITERAL_CSTRING("prefs.js")
#define USER_CHROME_DIR_50_NAME NS_LITERAL_CSTRING("chrome")
#define LOCAL_STORE_FILE_50_NAME NS_LITERAL_CSTRING("localstore.rdf")
#define HISTORY_FILE_50_NAME NS_LITERAL_CSTRING("history.dat")
#define PANELS_FILE_50_NAME NS_LITERAL_CSTRING("panels.rdf")
@@ -123,17 +122,17 @@ nsProfileDirServiceProvider::SetProfileD
dirToLock = do_QueryInterface(mProfileDir);
rv = mProfileDirLock->Lock(dirToLock, nsnull);
if (NS_FAILED(rv))
return rv;
#endif
if (mNotifyObservers) {
nsCOMPtr<nsIObserverService> observerService =
- mozilla::services::GetObserverService();
+ do_GetService("@mozilla.org/observer-service;1");
if (!observerService)
return NS_ERROR_FAILURE;
NS_NAMED_LITERAL_STRING(context, "startup");
// Notify observers that the profile has changed - Here they respond to new profile
observerService->NotifyObservers(nsnull, "profile-do-change", context.get());
// Now observers can respond to something another observer did on "profile-do-change"
observerService->NotifyObservers(nsnull, "profile-after-change", context.get());
@@ -154,17 +153,17 @@ nsProfileDirServiceProvider::Register()
nsresult
nsProfileDirServiceProvider::Shutdown()
{
if (!mNotifyObservers)
return NS_OK;
nsCOMPtr<nsIObserverService> observerService =
- mozilla::services::GetObserverService();
+ do_GetService("@mozilla.org/observer-service;1");
if (!observerService)
return NS_ERROR_FAILURE;
NS_NAMED_LITERAL_STRING(context, "shutdown-persist");
observerService->NotifyObservers(nsnull, "profile-before-change", context.get());
return NS_OK;
}