Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: chrome/browser/task_manager/child_process_resource_provider.h

Issue 2197483003: Move the Mac Task Manager to the new backend code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_manager/child_process_resource_provider.h
diff --git a/chrome/browser/task_manager/child_process_resource_provider.h b/chrome/browser/task_manager/child_process_resource_provider.h
deleted file mode 100644
index ffb36350e15d21b56ff6685b5bb6b3b4d7f8b87d..0000000000000000000000000000000000000000
--- a/chrome/browser/task_manager/child_process_resource_provider.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_
-#define CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_
-
-#include <map>
-#include <vector>
-
-#include "base/macros.h"
-#include "chrome/browser/task_manager/resource_provider.h"
-#include "content/public/browser/browser_child_process_observer.h"
-#include "content/public/browser/notification_registrar.h"
-
-class TaskManager;
-
-namespace content {
-struct ChildProcessData;
-}
-
-namespace task_manager {
-
-class ChildProcessResource;
-
-class ChildProcessResourceProvider
- : public ResourceProvider,
- public content::BrowserChildProcessObserver {
- public:
- explicit ChildProcessResourceProvider(TaskManager* task_manager);
-
- Resource* GetResource(int origin_pid, int child_id, int route_id) override;
- void StartUpdating() override;
- void StopUpdating() override;
-
- // content::BrowserChildProcessObserver methods:
- void BrowserChildProcessHostConnected(
- const content::ChildProcessData& data) override;
- void BrowserChildProcessHostDisconnected(
- const content::ChildProcessData& data) override;
-
- private:
- ~ChildProcessResourceProvider() override;
-
- // Retrieves information about the running ChildProcessHosts (performed in the
- // IO thread).
- virtual void RetrieveChildProcessData();
-
- // Notifies the UI thread that the ChildProcessHosts information have been
- // retrieved.
- virtual void ChildProcessDataRetreived(
- const std::vector<content::ChildProcessData>& child_processes);
-
- void AddToTaskManager(const content::ChildProcessData& child_process_data);
-
- TaskManager* task_manager_;
-
- // Whether we are currently reporting to the task manager. Used to ignore
- // notifications sent after StopUpdating().
- bool updating_;
-
- // Maps the actual resources (the ChildProcessData) to the Task Manager
- // resources.
- typedef std::map<base::ProcessHandle, ChildProcessResource*>
- ChildProcessMap;
- ChildProcessMap resources_;
-
- // Maps the pids to the resources (used for quick access to the resource on
- // byte read notifications).
- typedef std::map<int, ChildProcessResource*> PidResourceMap;
- PidResourceMap pid_to_resources_;
-
- // A scoped container for notification registries.
- content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildProcessResourceProvider);
-};
-
-} // namespace task_manager
-
-#endif // CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698