1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/metrics/Metrics.jsm Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 +#ifndef MERGED_COMPARTMENT 1.11 + 1.12 +this.EXPORTED_SYMBOLS = ["Metrics"]; 1.13 + 1.14 +const {classes: Cc, interfaces: Ci, utils: Cu} = Components; 1.15 + 1.16 +const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000; 1.17 + 1.18 +#endif 1.19 + 1.20 +// We concatenate the JSMs together to eliminate compartment overhead. 1.21 +// This is a giant hack until compartment overhead is no longer an 1.22 +// issue. 1.23 +#define MERGED_COMPARTMENT 1.24 + 1.25 +#include providermanager.jsm 1.26 +; 1.27 +#include dataprovider.jsm 1.28 +; 1.29 +#include storage.jsm 1.30 +; 1.31 + 1.32 +this.Metrics = { 1.33 + ProviderManager: ProviderManager, 1.34 + DailyValues: DailyValues, 1.35 + Measurement: Measurement, 1.36 + Provider: Provider, 1.37 + Storage: MetricsStorageBackend, 1.38 + dateToDays: dateToDays, 1.39 + daysToDate: daysToDate, 1.40 +}; 1.41 +