#include "content/browser/background_fetch/storage/image_helpers.h"
#include "base/functional/bind.h"
#include "base/memory/ref_counted_memory.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "ui/gfx/image/image.h"
namespace content {
namespace background_fetch {
namespace {
constexpr int kMaxIconResolution = …;
std::string ConvertAndSerializeIcon(const SkBitmap& icon) { … }
SkBitmap DeserializeAndConvertIcon(
std::unique_ptr<std::string> serialized_icon) { … }
}
bool ShouldPersistIcon(const SkBitmap& icon) { … }
void SerializeIcon(const SkBitmap& icon, SerializeIconCallback callback) { … }
void DeserializeIcon(std::unique_ptr<std::string> serialized_icon,
DeserializeIconCallback callback) { … }
}
}