diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-13 00:08:52 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-13 00:08:52 +0200 |
commit | e16bcd08aae85a7d9c2de5a4b1c733280cb81112 (patch) | |
tree | 220026724ceb8fbcf18bf627fde022c2d8df0e91 /toolkit/components/telemetry/TelemetryHistogram.cpp | |
parent | 6571d2ceb42930dab01677ef0e95e732d5076fb8 (diff) | |
download | UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.gz UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.lz UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.tar.xz UXP-e16bcd08aae85a7d9c2de5a4b1c733280cb81112.zip |
Remove MOZ_WIDGET_GONK [2/2]
Tag #288
Diffstat (limited to 'toolkit/components/telemetry/TelemetryHistogram.cpp')
-rw-r--r-- | toolkit/components/telemetry/TelemetryHistogram.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/toolkit/components/telemetry/TelemetryHistogram.cpp b/toolkit/components/telemetry/TelemetryHistogram.cpp index abae9c613..ba0288979 100644 --- a/toolkit/components/telemetry/TelemetryHistogram.cpp +++ b/toolkit/components/telemetry/TelemetryHistogram.cpp @@ -583,7 +583,7 @@ internal_GetHistogramByName(const nsACString &name, Histogram **ret) } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) /** * This clones a histogram |existing| with the id |existingId| to a @@ -684,7 +684,7 @@ internal_HistogramAdd(Histogram& histogram, int32_t value, uint32_t dataset) return NS_OK; } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (Histogram* subsession = internal_GetSubsessionHistogram(histogram)) { subsession->Add(value); } @@ -729,7 +729,7 @@ internal_HistogramClear(Histogram& aHistogram, bool onlySubsession) aHistogram.Clear(); } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (Histogram* subsession = internal_GetSubsessionHistogram(aHistogram)) { subsession->Clear(); } @@ -926,7 +926,7 @@ private: typedef nsBaseHashtableET<nsCStringHashKey, Histogram*> KeyedHistogramEntry; typedef AutoHashtable<KeyedHistogramEntry> KeyedHistogramMapType; KeyedHistogramMapType mHistogramMap; -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) KeyedHistogramMapType mSubsessionMap; #endif @@ -950,7 +950,7 @@ KeyedHistogram::KeyedHistogram(const nsACString &name, uint32_t min, uint32_t max, uint32_t bucketCount, uint32_t dataset) : mHistogramMap() -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) , mSubsessionMap() #endif , mName(name) @@ -968,7 +968,7 @@ nsresult KeyedHistogram::GetHistogram(const nsCString& key, Histogram** histogram, bool subsession) { -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) KeyedHistogramMapType& map = subsession ? mSubsessionMap : mHistogramMap; #else KeyedHistogramMapType& map = mHistogramMap; @@ -980,7 +980,7 @@ KeyedHistogram::GetHistogram(const nsCString& key, Histogram** histogram, } nsCString histogramName; -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (subsession) { histogramName.AppendLiteral(SUBSESSION_HISTOGRAM_PREFIX); } @@ -1042,7 +1042,7 @@ KeyedHistogram::Add(const nsCString& key, uint32_t sample) if (!histogram) { return NS_ERROR_FAILURE; } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) Histogram* subsession = GetHistogram(key, true); MOZ_ASSERT(subsession); if (!subsession) { @@ -1055,7 +1055,7 @@ KeyedHistogram::Add(const nsCString& key, uint32_t sample) } histogram->Add(sample); -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) subsession->Add(sample); #endif return NS_OK; @@ -1068,7 +1068,7 @@ KeyedHistogram::Clear(bool onlySubsession) if (!XRE_IsParentProcess()) { return; } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) for (auto iter = mSubsessionMap.Iter(); !iter.Done(); iter.Next()) { iter.Get()->mData->Clear(); } @@ -1137,7 +1137,7 @@ nsresult KeyedHistogram::GetJSSnapshot(JSContext* cx, JS::Handle<JSObject*> obj, bool subsession, bool clearSubsession) { -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) KeyedHistogramMapType& map = subsession ? mSubsessionMap : mHistogramMap; #else KeyedHistogramMapType& map = mHistogramMap; @@ -1146,7 +1146,7 @@ KeyedHistogram::GetJSSnapshot(JSContext* cx, JS::Handle<JSObject*> obj, return NS_ERROR_FAILURE; } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (subsession && clearSubsession) { Clear(true); } @@ -1637,7 +1637,7 @@ internal_JSHistogram_Clear(JSContext *cx, unsigned argc, JS::Value *vp) } bool onlySubsession = false; -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); if (args.length() >= 1) { @@ -1874,7 +1874,7 @@ internal_JSKeyedHistogram_Snapshot(JSContext *cx, unsigned argc, JS::Value *vp) return internal_KeyedHistogram_SnapshotImpl(cx, argc, vp, false, false); } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) bool internal_JSKeyedHistogram_SubsessionSnapshot(JSContext *cx, unsigned argc, JS::Value *vp) @@ -1883,7 +1883,7 @@ internal_JSKeyedHistogram_SubsessionSnapshot(JSContext *cx, } #endif -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) bool internal_JSKeyedHistogram_SnapshotSubsessionAndClear(JSContext *cx, unsigned argc, @@ -1911,7 +1911,7 @@ internal_JSKeyedHistogram_Clear(JSContext *cx, unsigned argc, JS::Value *vp) return false; } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) bool onlySubsession = false; JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -1974,7 +1974,7 @@ internal_WrapAndReturnKeyedHistogram(KeyedHistogram *h, JSContext *cx, if (!(JS_DefineFunction(cx, obj, "add", internal_JSKeyedHistogram_Add, 2, 0) && JS_DefineFunction(cx, obj, "snapshot", internal_JSKeyedHistogram_Snapshot, 1, 0) -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) && JS_DefineFunction(cx, obj, "subsessionSnapshot", internal_JSKeyedHistogram_SubsessionSnapshot, 1, 0) && JS_DefineFunction(cx, obj, "snapshotSubsessionAndClear", @@ -2425,7 +2425,7 @@ TelemetryHistogram::CreateHistogramSnapshots(JSContext *cx, } Histogram* original = h; -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (subsession) { h = internal_GetSubsessionHistogram(*h); if (!h) { @@ -2453,7 +2453,7 @@ TelemetryHistogram::CreateHistogramSnapshots(JSContext *cx, } } -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) +#if !defined(MOZ_WIDGET_ANDROID) if (subsession && clearSubsession) { h->Clear(); } |