log_source.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2020 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_QUERY_TILES_INTERNAL_LOG_SOURCE_H_
  5. #define COMPONENTS_QUERY_TILES_INTERNAL_LOG_SOURCE_H_
  6. #include "components/query_tiles/internal/log_sink.h"
  7. #include "components/query_tiles/internal/tile_group.h"
  8. #include "components/query_tiles/internal/tile_types.h"
  9. #include "components/query_tiles/logger.h"
  10. #include "net/base/backoff_entry.h"
  11. namespace query_tiles {
  12. // A source for all relevant logging data. LoggerImpl will pull from an
  13. // instance of LogSource to push relevant log information to observers.
  14. class LogSource {
  15. public:
  16. virtual ~LogSource() = default;
  17. // Returns the TileFetcher status.
  18. virtual TileInfoRequestStatus GetFetcherStatus() = 0;
  19. // Returns the TileManager status.
  20. virtual TileGroupStatus GetGroupStatus() = 0;
  21. // Returns the pointer of TileGroup holds in memory. Nullptr if not exists.
  22. virtual TileGroup* GetTileGroup() = 0;
  23. };
  24. } // namespace query_tiles
  25. #endif // COMPONENTS_QUERY_TILES_INTERNAL_LOG_SOURCE_H_