mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
618cb96229
- Bug 865222 - Add MOZ_GUARD_OBJECT_NOTIFIER_PARAM to JSAutoCompartmentand JSAutoNullableCompartment; r=efaust (97d89fcd7) - Bug 1131325 - Move system country code from nsIGfxInfo2 to a more appropriate location. r=aklotz,smichaud (afb055f6b) - Bug 1192456 - Use perfect forwarding for DispatchWrapper rather than explicit move and copy constructors. r=terrence (bd30eb21e) - Bug 1155726 - OdinMonkey: add new cache failure code for when storage initialization fails (r=janv) (60fb4de2a) - Bug 1155292 - Add a check for properties found on non-native prototypes during Ion caching, r=jandem. (6864981f7) - pointer style (28c86a2d7)
34 lines
932 B
Plaintext
34 lines
932 B
Plaintext
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsString.h"
|
|
#include "MacHelpers.h"
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
namespace mozilla {
|
|
|
|
nsresult
|
|
GetSelectedCityInfo(nsAString& aCountryCode)
|
|
{
|
|
NSDictionary* selected_city =
|
|
[[NSUserDefaults standardUserDefaults]
|
|
objectForKey:@"com.apple.preferences.timezone.selected_city"];
|
|
NSString *countryCode = (NSString *)
|
|
[selected_city objectForKey:@"CountryCode"];
|
|
const char *countryCodeUTF8 = [countryCode UTF8String];
|
|
|
|
if (!countryCodeUTF8) {
|
|
return NS_ERROR_FAILURE;
|
|
}
|
|
|
|
AppendUTF8toUTF16(countryCodeUTF8, aCountryCode);
|
|
return NS_OK;
|
|
}
|
|
|
|
} // namespace Mozilla
|
|
|