#include "chrome/browser/task_manager/providers/task.h"
#include <stddef.h>
#include "base/numerics/safe_conversions.h"
#include "base/process/process.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/task_manager/providers/task_provider_observer.h"
#include "chrome/browser/task_manager/task_manager_observer.h"
#include "content/public/common/result_codes.h"
#include "ui/base/resource/resource_bundle.h"
namespace task_manager {
namespace {
int64_t g_last_id = …;
base::ProcessId DetermineProcessId(base::ProcessHandle handle,
base::ProcessId process_id) { … }
}
Task::Task(const std::u16string& title,
const gfx::ImageSkia* icon,
base::ProcessHandle handle,
base::ProcessId process_id)
: … { … }
Task::~Task() = default;
std::u16string Task::GetProfileNameFromProfile(Profile* profile) { … }
void Task::Activate() { … }
bool Task::IsKillable() { … }
void Task::Kill() { … }
void Task::Refresh(const base::TimeDelta& update_interval,
int64_t refresh_flags) { … }
void Task::UpdateProcessInfo(base::ProcessHandle handle,
base::ProcessId process_id,
TaskProviderObserver* observer) { … }
void Task::OnNetworkBytesRead(int64_t bytes_read) { … }
void Task::OnNetworkBytesSent(int64_t bytes_sent) { … }
void Task::GetTerminationStatus(base::TerminationStatus* out_status,
int* out_error_code) const { … }
std::u16string Task::GetProfileName() const { … }
SessionID Task::GetTabId() const { … }
bool Task::HasParentTask() const { … }
const Task* Task::GetParentTask() const { … }
bool Task::ReportsSqliteMemory() const { … }
int64_t Task::GetSqliteMemoryUsed() const { … }
int64_t Task::GetV8MemoryAllocated() const { … }
int64_t Task::GetV8MemoryUsed() const { … }
bool Task::ReportsWebCacheStats() const { … }
blink::WebCacheResourceTypeStats Task::GetWebCacheStats() const { … }
int Task::GetKeepaliveCount() const { … }
bool Task::IsRunningInVM() const { … }
int64_t Task::GetNetworkUsageRate() const { … }
int64_t Task::GetCumulativeNetworkUsage() const { … }
gfx::ImageSkia* Task::FetchIcon(int id, gfx::ImageSkia** result_image) { … }
}