blob: 133dc13658a0499406aded93c0e59bbbd6160144 [file] [log] [blame]
Angela Yoeurng24006262022-04-12 19:40:091// Copyright 2022 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_SEARCH_ENGINES_TEMPLATE_URL_STARTER_PACK_DATA_H_
6#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_STARTER_PACK_DATA_H_
7
Stephan Hartmannaca38ff2022-04-13 20:09:498#include <memory>
Angela Yoeurng24006262022-04-12 19:40:099#include <vector>
10
11struct TemplateURLData;
12
13// The Starter Pack is a set of built-in search engines that allow the user to
14// search various parts of Chrome from the Omnibox through keyword mode. Unlike
15// prepopulated engines, starter pack scopes are not "search engines" that
16// search the web. Instead, they use the built-in omnibox providers to provide
17// suggestions. This file defines those search engines and util functions.
18
19namespace TemplateURLStarterPackData {
20
21struct StarterPackEngine {
22 int name_message_id;
23 int keyword_message_id;
24 const char* const favicon_url;
25 const char* const search_url;
26 const int id;
27};
28
29extern const int kMaxStarterPackEngineID;
30extern const int kCurrentDataVersion;
31
32// Returns the current version of the starterpack data, so callers can know when
33// they need to re-merge.
34int GetDataVersion();
35
36// Returns a vector of all starter pack engines, in TemplateURLData format.
37std::vector<std::unique_ptr<TemplateURLData>> GetStarterPackEngines();
38
39} // namespace TemplateURLStarterPackData
40
41#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_STARTER_PACK_DATA_H_