| # Copyright 2023 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http:#www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| static_library("metrics") { |
| sources = [ |
| "cobalt_enabled_state_provider.cc", |
| "cobalt_enabled_state_provider.h", |
| "cobalt_metrics_log_uploader.cc", |
| "cobalt_metrics_log_uploader.h", |
| "cobalt_metrics_service_client.cc", |
| "cobalt_metrics_service_client.h", |
| "cobalt_metrics_services_manager.cc", |
| "cobalt_metrics_services_manager.h", |
| "cobalt_metrics_services_manager_client.cc", |
| "cobalt_metrics_services_manager_client.h", |
| "cobalt_metrics_uploader_callback.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//cobalt/browser:generated_types", |
| "//cobalt/h5vcc:metric_event_handler_wrapper", |
| "//components/metrics", |
| "//components/metrics_services_manager", |
| "//components/prefs", |
| "//third_party/metrics_proto", |
| ] |
| } |
| |
| target(gtest_target_type, "metrics_test") { |
| testonly = true |
| has_pedantic_warnings = true |
| |
| sources = [ |
| "cobalt_metrics_log_uploader_test.cc", |
| "cobalt_metrics_service_client_test.cc", |
| "cobalt_metrics_services_manager_client_test.cc", |
| ] |
| |
| deps = [ |
| ":metrics", |
| "//base", |
| "//cobalt//browser:test_dependencies_on_browser", |
| "//cobalt/browser:generated_types", |
| "//cobalt/h5vcc", |
| "//cobalt/h5vcc:metric_event_handler_wrapper", |
| "//cobalt/test:run_all_unittests", |
| "//components/metrics", |
| "//components/prefs:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/metrics_proto", |
| "//third_party/zlib/google:compression_utils", |
| ] |
| } |