OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_REQUEST_PARAMS_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_REQUEST_PARAMS_H_ |
| 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 |
| 11 #include "base/optional.h" |
| 12 #include "components/ntp_snippets/category.h" |
| 13 |
| 14 namespace ntp_snippets { |
| 15 |
| 16 // Contains all parameters for fetching NTPSnippets. |
| 17 struct NTPSnippetsRequestParams { |
| 18 NTPSnippetsRequestParams(); |
| 19 NTPSnippetsRequestParams(const NTPSnippetsRequestParams&); |
| 20 ~NTPSnippetsRequestParams(); |
| 21 |
| 22 // BCP 47 language code specifying the user's UI language. |
| 23 std::string language_code; |
| 24 |
| 25 // A set of suggestion IDs that should not be returned again. |
| 26 std::set<std::string> excluded_ids; |
| 27 |
| 28 // Maximum number of snippets to fetch. |
| 29 int count_to_fetch = 0; |
| 30 |
| 31 // Whether this is an interactive request, i.e. triggered by an explicit |
| 32 // user action. Typically, non-interactive requests are subject to a daily |
| 33 // quota. |
| 34 bool interactive_request = false; |
| 35 |
| 36 // If set, only return results for this category. |
| 37 base::Optional<Category> exclusive_category; |
| 38 }; |
| 39 |
| 40 } // namespace ntp_snippets |
| 41 |
| 42 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_NTP_SNIPPETS_REQUEST_PARAMS_H_ |
OLD | NEW |