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

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

Issue 2655633002: [task_manager] Add ARC process whitelist. (Closed)
Patch Set: 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
Index: chrome/browser/task_manager/providers/arc/arc_process_whitelist.h
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_whitelist.h b/chrome/browser/task_manager/providers/arc/arc_process_whitelist.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f9237566d054bd5ccffdf7d011bf948b8f77b81
--- /dev/null
+++ b/chrome/browser/task_manager/providers/arc/arc_process_whitelist.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_WHITELIST_H_
+#define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_ARC_ARC_PROCESS_WHITELIST_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 whitelist
+// 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 ArcProcessWhitelist {
+ public:
+ // Zero argument constructor will use a default whitelist.
+ ArcProcessWhitelist();
+ explicit ArcProcessWhitelist(std::set<std::string>&& whitelist);
+ ~ArcProcessWhitelist();
+
+ bool ShouldDisplayProcess(const arc::ArcProcess& process) const;
+
+ private:
+ std::set<std::string> whitelist_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcProcessWhitelist);
+};
+
+} // namespace task_manager
+
+#endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_ARC_ARC_PROCESS_WHITELIST_H_

Powered by Google App Engine
This is Rietveld 408576698