chromium/chrome/browser/download/download_status_updater_linux.cc

// Copyright 2013 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 <dlfcn.h>

#include <memory>
#include <string>

#include "base/compiler_specific.h"
#include "base/environment.h"
#include "base/nix/xdg_util.h"
#include "chrome/common/channel_info.h"
#include "ui/base/glib/glib_integers.h"

// Unity data typedefs.
UnityInspector;
unity_inspector_get_default_func;
unity_inspector_get_unity_running_func;

UnityLauncherEntry;
unity_launcher_entry_get_for_desktop_id_func;
unity_launcher_entry_set_count_func;
unity_launcher_entry_set_count_visible_func;
unity_launcher_entry_set_progress_func;
unity_launcher_entry_set_progress_visible_func;

namespace {

bool attempted_load =;

// Unity has a singleton object that we can ask whether the unity is running.
UnityInspector* inspector =;

// A link to the desktop entry in the panel.
UnityLauncherEntry* chrome_entry =;

// Retrieved functions from libunity.
unity_inspector_get_unity_running_func get_unity_running =;
unity_launcher_entry_set_count_func entry_set_count =;
unity_launcher_entry_set_count_visible_func entry_set_count_visible =;
unity_launcher_entry_set_progress_func entry_set_progress =;
unity_launcher_entry_set_progress_visible_func entry_set_progress_visible =;

NO_SANITIZE("cfi-icall")
void EnsureLibUnityLoaded() {}

NO_SANITIZE("cfi-icall")
bool IsRunning() {}

NO_SANITIZE("cfi-icall")
void SetDownloadCount(int count) {}

NO_SANITIZE("cfi-icall")
void SetProgressFraction(float percentage) {}

}  // namespace

void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
    download::DownloadItem* download) {}