chromium/chrome/browser/web_applications/jobs/install_placeholder_job.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/web_applications/jobs/install_placeholder_job.h"

#include <memory>
#include <utility>

#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/external_install_options.h"
#include "chrome/browser/web_applications/externally_managed_app_manager.h"
#include "chrome/browser/web_applications/install_bounce_metric.h"
#include "chrome/browser/web_applications/locks/shared_web_contents_with_app_lock.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_install_finalizer.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_contents/web_app_data_retriever.h"
#include "chrome/browser/web_applications/web_contents/web_contents_manager.h"
#include "components/webapps/browser/install_result_code.h"
#include "components/webapps/browser/web_contents/web_app_url_loader.h"
#include "components/webapps/common/web_app_id.h"
#include "content/public/browser/web_contents.h"
#include "ui/gfx/geometry/size.h"

class Profile;

namespace content {
class WebContents;
}

namespace web_app {

namespace {
// How often we retry to download a custom icon, not counting the first attempt.
const int MAX_ICON_DOWNLOAD_RETRIES =;
const base::TimeDelta ICON_DOWNLOAD_RETRY_DELAY =;
}  // namespace

InstallPlaceholderJob::InstallPlaceholderJob(
    Profile* profile,
    base::Value::Dict& debug_value,
    const ExternalInstallOptions& install_options,
    InstallAndReplaceCallback callback,
    SharedWebContentsWithAppLock& lock)
    :{}

InstallPlaceholderJob::~InstallPlaceholderJob() = default;

void InstallPlaceholderJob::Start() {}

void InstallPlaceholderJob::SetDataRetrieverForTesting(
    std::unique_ptr<WebAppDataRetriever> data_retriever) {}

void InstallPlaceholderJob::Abort(webapps::InstallResultCode code) {}

void InstallPlaceholderJob::OnUrlLoaded(
    webapps::WebAppUrlLoaderResult load_url_result) {}

void InstallPlaceholderJob::FetchCustomIcon(const GURL& url, int retries_left) {}

void InstallPlaceholderJob::OnCustomIconFetched(
    const GURL& image_url,
    int retries_left,
    IconsDownloadedResult result,
    IconsMap icons_map,
    DownloadedIconsHttpResults icons_http_results) {}

void InstallPlaceholderJob::FinalizeInstall(
    std::optional<std::reference_wrapper<const std::vector<SkBitmap>>>
        bitmaps) {}

void InstallPlaceholderJob::OnInstallFinalized(
    const webapps::AppId& app_id,
    webapps::InstallResultCode code) {}

}  // namespace web_app