chromium/chrome/browser/download/download_status_updater.cc

// Copyright 2012 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/download/download_status_updater.h"

#include <stdint.h>

#include <vector>

#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
#include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h"
#include "chrome/browser/profiles/profile.h"

namespace {

// DownloadStatusUpdater::UpdateAppIconDownloadProgress() expects to only be
// called once when a DownloadItem completes, then not again (except perhaps
// until it is resumed). The existence of WasInProgressData is effectively a
// boolean that indicates whether that final UpdateAppIconDownloadProgress()
// call has been made for a given DownloadItem. It is expected that there will
// be many more non-in-progress downloads than in-progress downloads, so
// WasInProgressData is set for in-progress downloads and cleared from
// non-in-progress downloads instead of the other way around in order to save
// memory.
class WasInProgressData : public base::SupportsUserData::Data {};

const char WasInProgressData::kKey[] =;

}  // anonymous namespace

#if !BUILDFLAG(IS_CHROMEOS_LACROS)
DownloadStatusUpdater::DownloadStatusUpdater() = default;
DownloadStatusUpdater::~DownloadStatusUpdater() = default;
#endif  // !BUILDFLAG(IS_CHROMEOS_LACROS)

bool DownloadStatusUpdater::GetProgress(float* progress,
                                        int* download_count) const {}

void DownloadStatusUpdater::AddManager(content::DownloadManager* manager) {}

void DownloadStatusUpdater::OnDownloadCreated(content::DownloadManager* manager,
                                              download::DownloadItem* item) {}

void DownloadStatusUpdater::OnDownloadUpdated(content::DownloadManager* manager,
                                              download::DownloadItem* item) {}

void DownloadStatusUpdater::OnManagerGoingDown(
    content::DownloadManager* manager) {}

void DownloadStatusUpdater::UpdateProfileKeepAlive(
    content::DownloadManager* manager) {}

#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH)
void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
    download::DownloadItem* download) {
  // TODO(avi): Implement for Android?
}
#endif