chromium/content/public/test/download_test_observer.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 "content/public/test/download_test_observer.h"
#include "base/memory/raw_ptr.h"

#include <vector>

#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/run_loop.h"
#include "components/download/public/common/download_url_parameters.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

DownloadUpdatedObserver::DownloadUpdatedObserver(
    download::DownloadItem* item,
    DownloadUpdatedObserver::EventFilter filter)
    :{}

DownloadUpdatedObserver::~DownloadUpdatedObserver() {}

bool DownloadUpdatedObserver::WaitForEvent() {}

void DownloadUpdatedObserver::OnDownloadUpdated(download::DownloadItem* item) {}

void DownloadUpdatedObserver::OnDownloadDestroyed(
    download::DownloadItem* item) {}

DownloadTestObserver::DownloadTestObserver(
    DownloadManager* download_manager,
    size_t wait_count,
    DangerousDownloadAction dangerous_download_action)
    :{}

DownloadTestObserver::~DownloadTestObserver() {}

void DownloadTestObserver::Init() {}

void DownloadTestObserver::ManagerGoingDown(DownloadManager* manager) {}

void DownloadTestObserver::WaitForFinished() {}

bool DownloadTestObserver::IsFinished() const {}

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

void DownloadTestObserver::OnDownloadDestroyed(
    download::DownloadItem* download) {}

void DownloadTestObserver::OnDownloadUpdated(download::DownloadItem* download) {}

size_t DownloadTestObserver::NumDangerousDownloadsSeen() const {}

size_t DownloadTestObserver::NumDownloadsSeenInState(
    download::DownloadItem::DownloadState state) const {}

void DownloadTestObserver::DownloadInFinalState(
    download::DownloadItem* download) {}

void DownloadTestObserver::SignalIfFinished() {}

void DownloadTestObserver::AcceptDangerousDownload(uint32_t download_id) {}

void DownloadTestObserver::DenyDangerousDownload(uint32_t download_id) {}

DownloadTestObserverTerminal::DownloadTestObserverTerminal(
    DownloadManager* download_manager,
    size_t wait_count,
    DangerousDownloadAction dangerous_download_action)
        :{}

DownloadTestObserverTerminal::~DownloadTestObserverTerminal() {}

bool DownloadTestObserverTerminal::IsDownloadInFinalState(
    download::DownloadItem* download) {}

DownloadTestObserverInProgress::DownloadTestObserverInProgress(
    DownloadManager* download_manager,
    size_t wait_count)
        :{}

DownloadTestObserverInProgress::~DownloadTestObserverInProgress() {}

bool DownloadTestObserverInProgress::IsDownloadInFinalState(
    download::DownloadItem* download) {}

DownloadTestObserverInterrupted::DownloadTestObserverInterrupted(
    DownloadManager* download_manager,
    size_t wait_count,
    DangerousDownloadAction dangerous_download_action)
        :{}

DownloadTestObserverInterrupted::~DownloadTestObserverInterrupted() {}

bool DownloadTestObserverInterrupted::IsDownloadInFinalState(
    download::DownloadItem* download) {}

void PingIOThread(int cycle, base::OnceClosure callback);

// Helper method to post a task to IO thread to ensure remaining operations on
// the IO thread complete.
void PingFileThread(int cycle, base::OnceClosure callback) {}

// Post a task to file thread, and wait for it to be posted back on to the IO
// thread if |cycle| is larger than 1. This ensures that all remaining
// operations on the IO thread complete.
void PingIOThread(int cycle, base::OnceClosure callback) {}

DownloadTestFlushObserver::DownloadTestFlushObserver(
    DownloadManager* download_manager)
    :{}

void DownloadTestFlushObserver::WaitForFlush() {}

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

void DownloadTestFlushObserver::ManagerGoingDown(DownloadManager* manager) {}

void DownloadTestFlushObserver::OnDownloadDestroyed(
    download::DownloadItem* download) {}

void DownloadTestFlushObserver::OnDownloadUpdated(
    download::DownloadItem* download) {}

DownloadTestFlushObserver::~DownloadTestFlushObserver() {}

// If we're waiting for that flush point, check the number
// of downloads in the IN_PROGRESS state and take appropriate
// action. If requested, also observes all downloads while iterating.
void DownloadTestFlushObserver::CheckDownloadsInProgress(
    bool observe_downloads) {}

DownloadTestItemCreationObserver::DownloadTestItemCreationObserver()
    :{}

DownloadTestItemCreationObserver::~DownloadTestItemCreationObserver() {}

void DownloadTestItemCreationObserver::WaitForDownloadItemCreation() {}

void DownloadTestItemCreationObserver::DownloadItemCreationCallback(
    download::DownloadItem* item,
    download::DownloadInterruptReason interrupt_reason) {}

download::DownloadUrlParameters::OnStartedCallback
DownloadTestItemCreationObserver::callback() {}

SavePackageFinishedObserver::SavePackageFinishedObserver(
    DownloadManager* manager,
    base::OnceClosure callback,
    std::set<download::DownloadItem::DownloadState> final_states)
    :{}

SavePackageFinishedObserver::~SavePackageFinishedObserver() {}

void SavePackageFinishedObserver::OnDownloadUpdated(
    download::DownloadItem* download) {}

void SavePackageFinishedObserver::OnDownloadDestroyed(
    download::DownloadItem* download) {}

void SavePackageFinishedObserver::OnDownloadCreated(
    DownloadManager* manager,
    download::DownloadItem* download) {}

void SavePackageFinishedObserver::ManagerGoingDown(DownloadManager* manager) {}

}  // namespace content