#include "components/manta/base_provider.h"
#include "base/containers/fixed_flat_map.h"
#include "base/version_info/channel.h"
#include "components/manta/proto/manta.pb.h"
namespace manta {
namespace {
constexpr char kHttpMethod[] = …;
constexpr char kHttpContentType[] = …;
constexpr char kOAuthScope[] = …;
constexpr base::TimeDelta kTimeout = …;
constexpr char kAutopushEndpointUrl[] = …;
constexpr char kProdEndpointUrl[] = …;
ChromeClientInfo;
ChromeClientInfo::Channel ConvertChannel(version_info::Channel channel) { … }
}
std::string GetProviderEndpoint(bool use_prod) { … }
BaseProvider::BaseProvider() = default;
BaseProvider::BaseProvider(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
signin::IdentityManager* identity_manager)
: … { … }
BaseProvider::BaseProvider(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
signin::IdentityManager* identity_manager,
const ProviderParams& provider_params)
: … { … }
BaseProvider::~BaseProvider() = default;
void BaseProvider::OnIdentityManagerShutdown(
signin::IdentityManager* identity_manager) { … }
void BaseProvider::RequestInternal(
const GURL& url,
const std::string& oauth_consumer_name,
const net::NetworkTrafficAnnotationTag& annotation_tag,
manta::proto::Request& request,
const MantaMetricType metric_type,
MantaProtoResponseCallback done_callback) { … }
std::unique_ptr<EndpointFetcher> BaseProvider::CreateEndpointFetcher(
const GURL& url,
const std::string& oauth_consumer_name,
const net::NetworkTrafficAnnotationTag& annotation_tag,
const std::string& post_data) { … }
std::unique_ptr<EndpointFetcher> BaseProvider::CreateEndpointFetcherForDemoMode(
const GURL& url,
const net::NetworkTrafficAnnotationTag& annotation_tag,
const std::string& post_data) { … }
}