network_utils.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_NETWORK_NETWORK_UTILS_H_
  5. #define ASH_SYSTEM_NETWORK_NETWORK_UTILS_H_
  6. #include "ash/ash_export.h"
  7. #include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h"
  8. namespace ash {
  9. // This enum is tied directly to a UMA enum |NetworkRowClickedAction| defined in
  10. // //tools/metrics/histograms/enums.xml, and should always reflect it (do not
  11. // change one without changing the other).
  12. enum class NetworkRowClickedAction {
  13. kConnectToNetwork = 0,
  14. kOpenNetworkSettingsPage = 1,
  15. kOpenSimUnlockDialog = 2,
  16. kMaxValue = kOpenSimUnlockDialog
  17. };
  18. // This enum is tied directly to a UMA enum |DetailedViewSection| defined in
  19. // //tools/metrics/histograms/enums.xml, and should always reflect it (do not
  20. // change one without changing the other).
  21. enum class DetailedViewSection {
  22. kWifiSection = 0,
  23. kMobileSection = 1,
  24. kEthernetSection = 2,
  25. kDetailedSection = 3,
  26. kMaxValue = kDetailedSection
  27. };
  28. ASH_EXPORT void RecordNetworkRowClickedAction(NetworkRowClickedAction action);
  29. ASH_EXPORT void RecordDetailedViewSection(DetailedViewSection section);
  30. ASH_EXPORT void RecordNetworkTypeToggled(
  31. chromeos::network_config::mojom::NetworkType network_type,
  32. bool new_state);
  33. } // namespace ash
  34. #endif // ASH_SYSTEM_NETWORK_NETWORK_UTILS_H_