Bug 1286530 - Turn ResourceStats API to ChromeOnly draft
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Fri, 22 Apr 2016 12:14:27 +0200
changeset 387094 bd15deef42a5edfc032a6d733f53eb83b441a49f
parent 387093 e68701978d6d11eddae268b4b1c860df881902ab
child 387095 49c29b3f1b51f0b3762707496246a34c6fd3b688
push id22896
push userbmo:lissyx+mozillians@lissyx.dyndns.org
push dateWed, 13 Jul 2016 13:02:44 +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.
    *