#include "content/test/mock_background_sync_controller.h"
#include "base/containers/contains.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
namespace {
const char kFieldTrialName[] = …;
const char kMaxAttemptsParameterName[] = …;
const char kMinPeriodicSyncEventsInterval[] = …;
}
namespace content {
MockBackgroundSyncController::MockBackgroundSyncController() = default;
MockBackgroundSyncController::~MockBackgroundSyncController() = default;
void MockBackgroundSyncController::NotifyOneShotBackgroundSyncRegistered(
const url::Origin& origin,
bool can_fire,
bool is_reregistered) { … }
void MockBackgroundSyncController::ScheduleBrowserWakeUpWithDelay(
blink::mojom::BackgroundSyncType sync_type,
base::TimeDelta delay) { … }
void MockBackgroundSyncController::CancelBrowserWakeup(
blink::mojom::BackgroundSyncType sync_type) { … }
void MockBackgroundSyncController::ApplyFieldTrialParamsOverrides() { … }
void MockBackgroundSyncController::GetParameterOverrides(
BackgroundSyncParameters* parameters) { … }
base::TimeDelta MockBackgroundSyncController::GetNextEventDelay(
const BackgroundSyncRegistration& registration,
BackgroundSyncParameters* parameters,
base::TimeDelta time_till_soonest_scheduled_event_for_origin) { … }
std::unique_ptr<BackgroundSyncController::BackgroundSyncEventKeepAlive>
MockBackgroundSyncController::CreateBackgroundSyncEventKeepAlive() { … }
void MockBackgroundSyncController::NoteSuspendedPeriodicSyncOrigins(
std::set<url::Origin> suspended_origins) { … }
void MockBackgroundSyncController::NoteRegisteredPeriodicSyncOrigins(
std::set<url::Origin> registered_origins) { … }
void MockBackgroundSyncController::AddToTrackedOrigins(
const url::Origin& origin) { … }
void MockBackgroundSyncController::RemoveFromTrackedOrigins(
const url::Origin& origin) { … }
}