#include "google_apis/gaia/gaia_config.h"
#include <optional>
#include <string_view>
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/threading/thread_restrictions.h"
#include "google_apis/gaia/gaia_switches.h"
#include "google_apis/google_api_keys.h"
#include "url/gurl.h"
GaiaConfig* GaiaConfig::GetInstance() { … }
GaiaConfig::GaiaConfig(base::Value::Dict parsed_config)
: … { … }
GaiaConfig::~GaiaConfig() = default;
bool GaiaConfig::GetURLIfExists(std::string_view key, GURL* out_url) { … }
bool GaiaConfig::GetAPIKeyIfExists(std::string_view key,
std::string* out_api_key) { … }
void GaiaConfig::SerializeContentsToCommandLineSwitch(
base::CommandLine* command_line) const { … }
std::unique_ptr<GaiaConfig> GaiaConfig::CreateFromCommandLineForTesting(
const base::CommandLine* command_line) { … }
void GaiaConfig::ResetInstanceForTesting() { … }
std::unique_ptr<GaiaConfig>* GaiaConfig::GetGlobalConfig() { … }
std::unique_ptr<GaiaConfig> GaiaConfig::ReadConfigFromString(
const std::string& config_contents) { … }
std::unique_ptr<GaiaConfig> GaiaConfig::ReadConfigFromDisk(
const base::FilePath& config_path) { … }
std::unique_ptr<GaiaConfig> GaiaConfig::ReadConfigFromCommandLineSwitches(
const base::CommandLine* command_line) { … }