1 // Copyright 2021 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_METRICS_STRUCTURED_NEUTRINO_LOGGING_UTIL_H_ 6 #define COMPONENTS_METRICS_STRUCTURED_NEUTRINO_LOGGING_UTIL_H_ 7 8 #include "components/metrics/structured/neutrino_logging.h" 9 #include "components/prefs/pref_service.h" 10 11 // This file is for functions that depend upon //components/metrics. 12 // Thus, these functions cannot be called by code in //components/metrics. 13 14 namespace metrics { 15 namespace structured { 16 17 // Log the location in the code and the client id to the NeutrinoDevices 18 // structured metrics log. Extract the client id using the local state. 19 void NeutrinoDevicesLogWithLocalState(PrefService* local_state, 20 NeutrinoDevicesLocation location); 21 22 // Log the enrollment status (managed or unmanged), location in the code and 23 // the client id to the NeutrinoDevices structured metrics log. Extract the 24 // client id using the local state. 25 void NeutrinoDevicesLogEnrollmentWithLocalState( 26 PrefService* local_state, 27 bool is_managed, 28 NeutrinoDevicesLocation location); 29 } // namespace structured 30 } // namespace metrics 31 32 #endif // COMPONENTS_METRICS_STRUCTURED_NEUTRINO_LOGGING_UTIL_H_ 33