Bug 1286530 - Turn NetworkStats API to ChromeOnly
MozReview-Commit-ID: AIwTszgegor
--- a/dom/webidl/MozNetworkStats.webidl
+++ b/dom/webidl/MozNetworkStats.webidl
@@ -28,17 +28,16 @@ dictionary NetworkStatsGetOptions
dictionary NetworkStatsAlarmOptions
{
Date startTime;
Date data;
};
[JSImplementation="@mozilla.org/networkstats;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStats {
/**
* App manifest URL of an application for specifying the per-app stats of the
* specified app.
*/
readonly attribute DOMString appManifestURL;
--- a/dom/webidl/MozNetworkStatsAlarm.webidl
+++ b/dom/webidl/MozNetworkStatsAlarm.webidl
@@ -1,14 +1,13 @@
/* 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/. */
[JSImplementation="@mozilla.org/networkstatsalarm;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsAlarm {
readonly attribute unsigned long alarmId;
readonly attribute MozNetworkStatsInterface network;
readonly attribute long long threshold;
readonly attribute any data;
};
--- a/dom/webidl/MozNetworkStatsData.webidl
+++ b/dom/webidl/MozNetworkStatsData.webidl
@@ -1,13 +1,12 @@
/* 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/. */
[JSImplementation="@mozilla.org/networkStatsdata;1",
ChromeOnly,
- CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsData {
readonly attribute unsigned long rxBytes; // Received bytes.
readonly attribute unsigned long txBytes; // Sent bytes.
readonly attribute Date date; // Date.
};
--- a/dom/webidl/MozNetworkStatsInterface.webidl
+++ b/dom/webidl/MozNetworkStatsInterface.webidl
@@ -7,17 +7,17 @@ dictionary NetworkInterface {
DOMString id;
};
/**
* Represents a data interface for which the manager is recording statistics.
*/
[Constructor(optional NetworkInterface networkinterface),
JSImplementation="@mozilla.org/networkstatsinterface;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly,
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsInterface {
readonly attribute long type;
/**
* Id value is '0' for wifi or the iccid for mobile (SIM).
*/
readonly attribute DOMString id;
--- a/dom/webidl/MozNetworkStatsManager.webidl
+++ b/dom/webidl/MozNetworkStatsManager.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*/
[NavigatorProperty="mozNetworkStats",
JSImplementation="@mozilla.org/networkStatsManager;1",
- CheckAnyPermissions="networkstats-manage",
+ ChromeOnly,
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsManager {
/**
* Constants for known interface types.
*/
const long WIFI = 0;
const long MOBILE = 1;