Chromium Code Reviews| Index: components/search_engines/template_url_data_util.h |
| diff --git a/components/search_engines/template_url_data_util.h b/components/search_engines/template_url_data_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a2acd2ed0e5ae1f5a855e81dadcb5641305b26ac |
| --- /dev/null |
| +++ b/components/search_engines/template_url_data_util.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_UTIL_H_ |
| +#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_UTIL_H_ |
| + |
| +#include <memory> |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| + |
| +namespace TemplateURLPrepopulateData { |
| +struct PrepopulatedEngine; |
| +} |
| + |
| +struct TemplateURLData; |
| + |
| +// Restore TemplateURLData structure from base::DictionaryValue as stored by |
|
Peter Kasting
2016/11/20 07:57:50
Nit: Function overview comments should be descript
Alexander Yashkin
2016/11/20 20:24:05
Fixed, thanks.
|
| +// DefaultSearchManager. |
| +std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary( |
| + const base::DictionaryValue& dict); |
| + |
| +// Store TemplateURLData structure to base::DictionaryValue, in |
| +// DefaultSearchManager format. |
| +std::unique_ptr<base::DictionaryValue> TemplateURLDataToDictionary( |
| + const TemplateURLData& turl_data); |
| + |
| +// Create TemplateURLData structure from PrepopulatedEngine structure. |
| +std::unique_ptr<TemplateURLData> TemplateURLDataFromPrepopulatedEngine( |
| + const TemplateURLPrepopulateData::PrepopulatedEngine& engine); |
| + |
| +// Restore TemplateURLData structure from base::DictionaryValue as stored in |
| +// kSearchProviderOverrides pref. |
|
Peter Kasting
2016/11/20 07:57:50
Nit: Here you might clarify that this differs from
Alexander Yashkin
2016/11/20 20:24:05
Comment fixed.
|
| +std::unique_ptr<TemplateURLData> TemplateURLDataFromOverrideDictionary( |
| + const base::DictionaryValue& engine); |
| + |
| +#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_UTIL_H_ |