mobile/android/base/health/HealthRecorder.java

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mobile/android/base/health/HealthRecorder.java	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
     1.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +package org.mozilla.gecko.health;
    1.10 +
    1.11 +import android.content.SharedPreferences;
    1.12 +
    1.13 +import org.json.JSONObject;
    1.14 +
    1.15 +/**
    1.16 + * HealthRecorder is an interface into the Firefox Health Report storage system.
    1.17 + */
    1.18 +public interface HealthRecorder {
    1.19 +    /**
    1.20 +     * Returns whether the Health Recorder is actively recording events.
    1.21 +     */
    1.22 +    public boolean isEnabled();
    1.23 +
    1.24 +    public void setCurrentSession(SessionInformation session);
    1.25 +    public void checkForOrphanSessions();
    1.26 +
    1.27 +    public void recordGeckoStartupTime(long duration);
    1.28 +    public void recordJavaStartupTime(long duration);
    1.29 +    public void recordSearch(final String engineID, final String location);
    1.30 +    public void recordSessionEnd(String reason, SharedPreferences.Editor editor);
    1.31 +    public void recordSessionEnd(String reason, SharedPreferences.Editor editor, final int environment);
    1.32 +
    1.33 +    public void onAppLocaleChanged(String to);
    1.34 +    public void onAddonChanged(String id, JSONObject json);
    1.35 +    public void onAddonUninstalling(String id);
    1.36 +    public void onEnvironmentChanged();
    1.37 +    public void onEnvironmentChanged(final boolean startNewSession, final String sessionEndReason);
    1.38 +
    1.39 +    public void close();
    1.40 +}

mercurial