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 5 #ifndef COMPONENTS_QUERY_TILES_SWITCHES_H_ 6 #define COMPONENTS_QUERY_TILES_SWITCHES_H_ 7 8 #include "base/feature_list.h" 9 10 namespace query_tiles { 11 12 namespace features { 13 14 // Main feature flag for the query tiles feature that allows or blocks the 15 // feature in the user's country. Must be checked in addition to any other flag. 16 extern const base::Feature kQueryTilesGeoFilter; 17 18 // Main feature flag for the query tiles feature. All other flags are 19 // effective only when this flag is enabled. 20 extern const base::Feature kQueryTiles; 21 22 // Feature flag to determine whether query tiles should be shown on NTP. 23 extern const base::Feature kQueryTilesInNTP; 24 25 // Feature flag to determine whether query tiles should be shown on omnibox. 26 extern const base::Feature kQueryTilesInOmnibox; 27 28 // Feature flag to determine whether the user will have a chance to edit the 29 // query before in the omnibox sumbitting the search. In this mode only one 30 // level of tiles will be displayed. 31 extern const base::Feature kQueryTilesEnableQueryEditing; 32 33 // Feature flag to determine whether query tiles should be displayed in an order 34 // based on local user interactions. 35 extern const base::Feature kQueryTilesLocalOrdering; 36 37 // Feature flag to determine whether trending tiles should disapear after 38 // some time of inactivity. 39 extern const base::Feature kQueryTilesRemoveTrendingTilesAfterInactivity; 40 41 // Helper function to determine whether query tiles should be shown on omnibox. 42 bool IsEnabledQueryTilesInOmnibox(); 43 44 } // namespace features 45 46 namespace switches { 47 48 // If set, only one level of query tiles will be shown. 49 extern const char kQueryTilesSingleTier[]; 50 51 // If set, this value overrides the default country code to be sent to the 52 // server when fetching tiles. 53 extern const char kQueryTilesCountryCode[]; 54 55 // If set, the background task will be started after a short period. 56 extern const char kQueryTilesInstantBackgroundTask[]; 57 58 // If set, server will return trending tiles along with curated tiles. 59 extern const char kQueryTilesEnableTrending[]; 60 61 } // namespace switches 62 } // namespace query_tiles 63 64 #endif // COMPONENTS_QUERY_TILES_SWITCHES_H_ 65