This commit is contained in:
Ryan VanderMeulen 2013-06-12 22:02:20 -04:00
Родитель f6ad445a82 64b502c512
Коммит 4a1fe86330
6 изменённых файлов: 26 добавлений и 9 удалений

Просмотреть файл

@ -1,4 +1,4 @@
{ {
"repo_path": "/integration/gaia-central", "revision": "7a4b216668aebe56f71c17dde2ff619bfd005aa7",
"revision": "3f5bb84585fc" "repo_path": "/integration/gaia-central"
} }

Просмотреть файл

@ -417,7 +417,9 @@ Contact.prototype = {
}, },
set bday(aBday) { set bday(aBday) {
if (aBday !== undefined && aBday !== null) { if (aBday instanceof Date) {
this._bday = aBday;
} else if (typeof aBday === "string" || typeof aBday === "number") {
this._bday = new Date(aBday); this._bday = new Date(aBday);
} }
}, },
@ -427,7 +429,9 @@ Contact.prototype = {
}, },
set anniversary(aAnniversary) { set anniversary(aAnniversary) {
if (aAnniversary !== undefined && aAnniversary !== null) { if (aAnniversary instanceof Date) {
this._anniversary = aAnniversary;
} else if (typeof aAnniversary === "string" || typeof aAnniversary === "number") {
this._anniversary = new Date(aAnniversary); this._anniversary = new Date(aAnniversary);
} }
}, },

Просмотреть файл

@ -224,6 +224,8 @@ public:
already_AddRefed<DOMRequest> UsedSpace(ErrorResult& aRv); already_AddRefed<DOMRequest> UsedSpace(ErrorResult& aRv);
already_AddRefed<DOMRequest> Available(ErrorResult& aRv); already_AddRefed<DOMRequest> Available(ErrorResult& aRv);
bool Default();
// Uses XPCOM GetStorageName // Uses XPCOM GetStorageName
static void CreateDeviceStorageFor(nsPIDOMWindow* aWin, static void CreateDeviceStorageFor(nsPIDOMWindow* aWin,

Просмотреть файл

@ -3043,11 +3043,18 @@ nsDOMDeviceStorage::GetRootDirectoryForFile(const nsAString& aName, nsIFile** aR
return ds->mRootDirectory->Clone(aRootDirectory); return ds->mRootDirectory->Clone(aRootDirectory);
} }
NS_IMETHODIMP bool
nsDOMDeviceStorage::GetDefault(bool* aDefault) { nsDOMDeviceStorage::Default()
{
nsString defaultStorageName; nsString defaultStorageName;
GetWritableStorageName(mStorageType, defaultStorageName); GetWritableStorageName(mStorageType, defaultStorageName);
*aDefault = mStorageName.Equals(defaultStorageName); return mStorageName.Equals(defaultStorageName);
}
NS_IMETHODIMP
nsDOMDeviceStorage::GetDefault(bool* aDefault)
{
*aDefault = Default();
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -259,8 +259,8 @@ NetworkManager.prototype = {
break; break;
case TOPIC_INTERFACE_REGISTERED: case TOPIC_INTERFACE_REGISTERED:
let regNetwork = subject.QueryInterface(Ci.nsINetworkInterface); let regNetwork = subject.QueryInterface(Ci.nsINetworkInterface);
debug("Network '" + regNetwork.name + "' registered, adding mmsproxy and/or mmsc route");
if (regNetwork.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS) { if (regNetwork.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS) {
debug("Network '" + regNetwork.name + "' registered, adding mmsproxy and/or mmsc route");
let mmsHosts = this.resolveHostname( let mmsHosts = this.resolveHostname(
[ Services.prefs.getCharPref("ril.mms.mmsproxy"), [ Services.prefs.getCharPref("ril.mms.mmsproxy"),
Services.prefs.getCharPref("ril.mms.mmsc") ] Services.prefs.getCharPref("ril.mms.mmsc") ]
@ -270,8 +270,8 @@ NetworkManager.prototype = {
break; break;
case TOPIC_INTERFACE_UNREGISTERED: case TOPIC_INTERFACE_UNREGISTERED:
let unregNetwork = subject.QueryInterface(Ci.nsINetworkInterface); let unregNetwork = subject.QueryInterface(Ci.nsINetworkInterface);
debug("Network '" + regNetwork.name + "' unregistered, removing mmsproxy and/or mmsc route");
if (unregNetwork.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS) { if (unregNetwork.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS) {
debug("Network '" + unregNetwork.name + "' unregistered, removing mmsproxy and/or mmsc route");
let mmsHosts = this.resolveHostname( let mmsHosts = this.resolveHostname(
[ Services.prefs.getCharPref("ril.mms.mmsproxy"), [ Services.prefs.getCharPref("ril.mms.mmsproxy"),
Services.prefs.getCharPref("ril.mms.mmsc") ] Services.prefs.getCharPref("ril.mms.mmsc") ]

Просмотреть файл

@ -44,4 +44,8 @@ interface DeviceStorage : EventTarget {
// Note that the storageName is just a name (like sdcard), and doesn't // Note that the storageName is just a name (like sdcard), and doesn't
// include any path information. // include any path information.
readonly attribute DOMString storageName; readonly attribute DOMString storageName;
// Determines if this storage area is the one which will be used by default
// for storing new files.
readonly attribute boolean default;
}; };