switches.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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_SWITCHES_H_
  5. #define COMPONENTS_QUERY_TILES_SWITCHES_H_
  6. #include "base/feature_list.h"
  7. namespace query_tiles {
  8. namespace features {
  9. // Main feature flag for the query tiles feature. All other flags are
  10. // effective only when this flag is enabled.
  11. extern const base::Feature kQueryTiles;
  12. // Feature flag to determine whether query tiles should be shown on NTP.
  13. extern const base::Feature kQueryTilesInNTP;
  14. // Feature flag to determine whether the user will have a chance to edit the
  15. // query before in the omnibox sumbitting the search. In this mode only one
  16. // level of tiles will be displayed.
  17. extern const base::Feature kQueryTilesEnableQueryEditing;
  18. // Feature flag to determine whether trending tiles should disapear after
  19. // some time of inactivity.
  20. extern const base::Feature kQueryTilesRemoveTrendingTilesAfterInactivity;
  21. // Whether segmentation rules are applied to query tiles.
  22. extern const base::Feature kQueryTilesSegmentation;
  23. // Whether to disable the override rules introduced for countries.
  24. extern const base::Feature kQueryTilesDisableCountryOverride;
  25. // Feature flag to determine whether query tiles should be shown on start surface.
  26. extern const base::Feature kQueryTilesOnStart;
  27. // Returns whether query tiles are enabled for the country.
  28. bool IsQueryTilesEnabledForCountry(const std::string& country_code);
  29. } // namespace features
  30. namespace switches {
  31. // If set, only one level of query tiles will be shown.
  32. extern const char kQueryTilesSingleTier[];
  33. // If set, this value overrides the default country code to be sent to the
  34. // server when fetching tiles.
  35. extern const char kQueryTilesCountryCode[];
  36. // If set, the background task will be started after a short period.
  37. extern const char kQueryTilesInstantBackgroundTask[];
  38. // If set, server will return trending tiles along with curated tiles.
  39. extern const char kQueryTilesEnableTrending[];
  40. // If set, the server will rank all the tiles and send a subset of them
  41. // to the client based on user interest.
  42. extern const char kQueryTilesRankTiles[];
  43. } // namespace switches
  44. } // namespace query_tiles
  45. #endif // COMPONENTS_QUERY_TILES_SWITCHES_H_