ukm_url_recorder.h 800 B

12345678910111213141516171819202122232425
  1. // Copyright 2018 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 COMPONENTS_UKM_IOS_UKM_URL_RECORDER_H_
  5. #define COMPONENTS_UKM_IOS_UKM_URL_RECORDER_H_
  6. #include "services/metrics/public/cpp/ukm_source_id.h"
  7. namespace web {
  8. class WebState;
  9. } // namespace web
  10. namespace ukm {
  11. // Initializes recording of UKM source URLs for the given WebState.
  12. void InitializeSourceUrlRecorderForWebState(web::WebState* web_state);
  13. // Gets a UKM SourceId for the currently committed document of web state.
  14. // Returns kInvalidSourceId if no commit has been observed.
  15. SourceId GetSourceIdForWebStateDocument(web::WebState* web_state);
  16. } // namespace ukm
  17. #endif // COMPONENTS_UKM_IOS_UKM_URL_RECORDER_H_