#include "components/sync/engine/net/server_connection_manager.h"
#include <errno.h>
#include <ostream>
#include "base/check_is_test.h"
#include "base/metrics/histogram.h"
#include "base/observer_list.h"
#include "build/build_config.h"
#include "components/sync/engine/cancelation_signal.h"
#include "components/sync/engine/net/url_translator.h"
#include "components/sync/engine/syncer.h"
#include "net/http/http_status_code.h"
#include "url/gurl.h"
namespace syncer {
namespace {
#define ENUM_CASE …
const char* GetServerConnectionCodeString(
HttpResponse::ServerConnectionCode code) { … }
#undef ENUM_CASE
}
HttpResponse::HttpResponse()
: … { … }
HttpResponse HttpResponse::Uninitialized() { … }
HttpResponse HttpResponse::ForNetError(int net_error_code) { … }
HttpResponse HttpResponse::ForUnspecifiedError() { … }
HttpResponse HttpResponse::ForHttpStatusCode(int http_status_code) { … }
HttpResponse HttpResponse::ForSuccessForTest() { … }
ServerConnectionManager::ServerConnectionManager()
: … { … }
ServerConnectionManager::~ServerConnectionManager() = default;
bool ServerConnectionManager::SetAccessToken(const std::string& access_token) { … }
void ServerConnectionManager::ClearAccessToken() { … }
void ServerConnectionManager::SetServerResponse(
const HttpResponse& server_response) { … }
void ServerConnectionManager::NotifyStatusChanged() { … }
HttpResponse ServerConnectionManager::PostBufferWithCachedAuth(
const std::string& buffer_in,
std::string* buffer_out) { … }
void ServerConnectionManager::AddListener(
ServerConnectionEventListener* listener) { … }
void ServerConnectionManager::RemoveListener(
ServerConnectionEventListener* listener) { … }
std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr) { … }
}