Bug 1286530 - Turn ResourceStats API to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 12:14:27 +0200
changeset 387251 3cc220563924509873344ac2aae25783de4f56da
parent 387250 8ae45e505bddd3dd0f9592867d77469846bb4138
child 387252 fa17ea49db2dc2f9ba53f45aed900e0a2d639576
push id22914
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 15:39:24 +0000
bugs1286530
milestone50.0a1
Bug 1286530 - Turn ResourceStats API to ChromeOnly MozReview-Commit-ID: JOnHviptd2p
dom/webidl/ResourceStats.webidl
dom/webidl/ResourceStatsManager.webidl
--- a/dom/webidl/ResourceStats.webidl
+++ b/dom/webidl/ResourceStats.webidl
@@ -1,38 +1,35 @@
 /* -*- 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/.
  */
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/networkStatsData;1"]
 interface NetworkStatsData
 {
   readonly attribute unsigned long long   receivedBytes;
   readonly attribute unsigned long long   sentBytes;
   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/powerStatsData;1"]
 interface PowerStatsData
 {
   readonly attribute unsigned long long   consumedPower;  // unit: mW
   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStats;1"]
 interface ResourceStats
 {
   /**
    * Type of statistics/
    */
   readonly attribute ResourceType   type;
 
--- a/dom/webidl/ResourceStatsManager.webidl
+++ b/dom/webidl/ResourceStatsManager.webidl
@@ -65,19 +65,18 @@ dictionary ResourceStatsAlarmOptions
    *
    * |data| is used to reflect in the alarm object when the alarm is triggered.
    * |data| should be copied using the structured clone algorithm.
    */
   [EnforceRange] DOMTimeStamp   startTime;  // time in milliseconds since Epoch
   any                           data;
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStatsAlarm;1"]
 interface ResourceStatsAlarm
 {
   /**
    * ID of the alarm
    */
   readonly attribute unsigned long          alarmId;
 
@@ -107,20 +106,19 @@ interface ResourceStatsAlarm
   readonly attribute unsigned long long     threshold;
 
   /**
    * |data| is used to reflect in the alarm object when the alarm is triggered.
    */
   readonly attribute any                    data;
 };
 
-[CheckAnyPermissions="resourcestats-manage",
+[ChromeOnly,
  Pref="dom.resource_stats.enabled",
  Constructor(ResourceType type),
- AvailableIn="CertifiedApps",
  JSImplementation="@mozilla.org/resourceStatsManager;1"]
 interface ResourceStatsManager
 {
   /**
    * Query resource statistics.
    *
    * |statsOptions| specifies the detail of statistics of interest.
    *