chromium/components/search_engines/template_url_data_util.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/search_engines/template_url_data_util.h"

#include <string>
#include <string_view>

#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "components/search_engines/default_search_manager.h"
#include "components/search_engines/prepopulated_engines.h"
#include "components/search_engines/template_url_data.h"
#include "components/search_engines/template_url_starter_pack_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

namespace {

// Converts the C-style string `str` to a std::string_view making sure to avoid
// dereferencing nullptrs.
std::string_view ToStringPiece(const char* str) {}

std::u16string_view ToU16StringView(const char16_t* str) {}

}  // namespace

std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary(
    const base::Value::Dict& dict) {}

base::Value::Dict TemplateURLDataToDictionary(const TemplateURLData& data) {}

std::unique_ptr<TemplateURLData> TemplateURLDataFromPrepopulatedEngine(
    const TemplateURLPrepopulateData::PrepopulatedEngine& engine) {}

std::unique_ptr<TemplateURLData> TemplateURLDataFromOverrideDictionary(
    const base::Value::Dict& engine_dict) {}

std::unique_ptr<TemplateURLData> TemplateURLDataFromStarterPackEngine(
    const TemplateURLStarterPackData::StarterPackEngine& engine) {}