Bug 1286530 - Turn NetworkStats API to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 12:13:12 +0200
changeset 387250 8ae45e505bddd3dd0f9592867d77469846bb4138
parent 387249 ba4546884e1d9feae0edd2391766bce876a5bc08
child 387251 3cc220563924509873344ac2aae25783de4f56da
push id22914
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 15:39:24 +0000
bugs1286530
milestone50.0a1
Bug 1286530 - Turn NetworkStats API to ChromeOnly MozReview-Commit-ID: AIwTszgegor
dom/webidl/MozNetworkStats.webidl
dom/webidl/MozNetworkStatsAlarm.webidl
dom/webidl/MozNetworkStatsData.webidl
dom/webidl/MozNetworkStatsInterface.webidl
dom/webidl/MozNetworkStatsManager.webidl
--- 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;