mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backing out accidental update
This commit is contained in:
parent
08c10270a4
commit
f6f0fa4618
@ -38,8 +38,6 @@
|
||||
|
||||
#include "nsGConfService.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "nsSupportsPrimitives.h"
|
||||
#include "nsArray.h"
|
||||
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
@ -125,37 +123,6 @@ nsGConfService::GetFloat(const nsACString &aKey, float* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGConfService::GetStringList(const nsACString &aKey, nsIArray** aResult)
|
||||
{
|
||||
nsCOMPtr<nsIMutableArray> items;
|
||||
NS_NewArray(getter_AddRefs(items));
|
||||
if (!items)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
GError* error = nsnull;
|
||||
GSList* list = gconf_client_get_list(mClient, PromiseFlatCString(aKey).get(),
|
||||
GCONF_VALUE_STRING, &error);
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
for (GSList* l = list; l; l = l->next) {
|
||||
nsSupportsCStringImpl* obj = new nsSupportsCStringImpl();
|
||||
if (!obj) {
|
||||
g_slist_free(list);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
obj->SetData(nsDependentCString((const char*)l->data));
|
||||
items->AppendElement(obj, PR_FALSE);
|
||||
}
|
||||
|
||||
g_slist_free(list);
|
||||
NS_ADDREF(*aResult = items);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGConfService::SetBool(const nsACString &aKey, PRBool aValue)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user