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

Unified Diff: chrome/browser/task_manager/providers/arc/arc_process_filter.h

Issue 2655633002: [task_manager] Add ARC process whitelist. (Closed)
Patch Set: Address comments. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/task_manager/providers/arc/arc_process_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/providers/arc/arc_process_filter.h
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_filter.h b/chrome/browser/task_manager/providers/arc/arc_process_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..d1f1d89d0f1c45178f646d52e0e3549cbe2d0632
--- /dev/null
+++ b/chrome/browser/task_manager/providers/arc/arc_process_filter.h
@@ -0,0 +1,36 @@
+// Copyright 2017 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_PROVIDERS_ARC_ARC_PROCESS_FILTER_H_
+#define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_ARC_ARC_PROCESS_FILTER_H_
+
+#include <set>
+#include <string>
+
+#include "chrome/browser/chromeos/arc/process/arc_process.h"
+
+namespace task_manager {
+
+// The many ARC system apps can make the task manager noisy. This filter
+// determines whether to show an ARC process in the task manager or not.
+// Apps can be whitelisted explicitly, or allowed based on their ProcessState.
+// See crbug.com/654564
+class ArcProcessFilter {
+ public:
+ // Zero argument constructor will use a default whitelist.
+ ArcProcessFilter();
+ explicit ArcProcessFilter(const std::set<std::string>& whitelist);
+ ~ArcProcessFilter();
+
+ bool ShouldDisplayProcess(const arc::ArcProcess& process) const;
+
+ private:
+ const std::set<std::string> whitelist_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcProcessFilter);
+};
+
+} // namespace task_manager
+
+#endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_ARC_ARC_PROCESS_FILTER_H_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/task_manager/providers/arc/arc_process_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698