blob: f8fbf27d06556c89a2e7c8581ca16b5307c12e18 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_METRICS_H_
#define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_METRICS_H_
namespace autofill_assistant {
// A class to generate Autofill Assistant related histograms.
class Metrics {
public:
// The different ways that autofill assistant can stop.
//
// GENERATED_JAVA_ENUM_PACKAGE: (
// org.chromium.chrome.browser.autofill_assistant.metrics)
// GENERATED_JAVA_CLASS_NAME_OVERRIDE: DropOutReason
enum DropOutReason {
AA_START = 0,
AUTOSTART_TIMEOUT = 1,
NO_SCRIPTS = 2,
CUSTOM_TAB_CLOSED = 3,
DECLINED = 4,
SHEET_CLOSED = 5,
SCRIPT_FAILED = 6,
NAVIGATION = 7,
OVERLAY_STOP = 8,
PR_FAILED = 9,
CONTENT_DESTROYED = 10,
RENDER_PROCESS_GONE = 11,
INTERSTITIAL_PAGE = 12,
SCRIPT_SHUTDOWN = 13,
SAFETY_NET_TERMINATE = 14, // This is a "should never happen" entry.
TAB_DETACHED = 15,
TAB_CHANGED = 16,
NUM_ENTRIES = 17,
};
static void RecordDropOut(DropOutReason reason);
};
} // namespace autofill_assistant
#endif // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_METRICS_H_