#include "chrome/browser/apps/app_service/app_icon_source.h"
#include <string>
#include <string_view>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/apps/app_service/app_icon/dip_px_util.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "components/services/app_service/public/cpp/app_types.h"
#include "components/services/app_service/public/cpp/icon_types.h"
#include "extensions/grit/extensions_browser_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
namespace apps {
namespace {
void LoadDefaultImage(content::URLDataSource::GotDataCallback callback) { … }
void RunCallback(content::URLDataSource::GotDataCallback callback,
apps::IconValuePtr iv) { … }
}
AppIconSource::AppIconSource(Profile* profile) : … { … }
AppIconSource::~AppIconSource() = default;
GURL AppIconSource::GetIconURL(const std::string& app_id, int icon_size) { … }
std::string AppIconSource::GetSource() { … }
void AppIconSource::StartDataRequest(
const GURL& url,
const content::WebContents::Getter& wc_getter,
content::URLDataSource::GotDataCallback callback) { … }
std::string AppIconSource::GetMimeType(const GURL&) { … }
bool AppIconSource::AllowCaching() { … }
bool AppIconSource::ShouldReplaceExistingSource() { … }
}