alt_game_images.h 844 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (c) 2021 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_ERROR_PAGE_COMMON_ALT_GAME_IMAGES_H_
  5. #define COMPONENTS_ERROR_PAGE_COMMON_ALT_GAME_IMAGES_H_
  6. #include <string>
  7. #include "base/feature_list.h"
  8. #include "base/metrics/field_trial_params.h"
  9. namespace error_page {
  10. extern const base::Feature kNetErrorAltGameMode;
  11. extern const base::FeatureParam<std::string> kNetErrorAltGameModeKey;
  12. // Gets the value of kNetErrorAltGameMode.
  13. bool EnableAltGameMode();
  14. // Returns a data URL corresponding to the image ID and scale.
  15. std::string GetAltGameImage(int image_id, int scale);
  16. // Returns an image ID.
  17. int ChooseAltGame();
  18. } // namespace error_page
  19. #endif // COMPONENTS_ERROR_PAGE_COMMON_ALT_GAME_IMAGES_H_