Chromium Code Reviews| 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..cf338efcea7a5648041e3b40791ba13b19d54aa8 |
| --- /dev/null |
| +++ b/chrome/browser/task_manager/providers/arc/arc_process_filter.h |
| @@ -0,0 +1,37 @@ |
| +// 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(std::set<std::string>&& whitelist); |
|
Luis Héctor Chávez
2017/01/26 17:55:13
Given that you will only use the non-default const
Eliot Courtney
2017/01/30 07:48:53
Done.
|
| + explicit ArcProcessFilter(const std::set<std::string>& whitelist); |
| + ~ArcProcessFilter(); |
| + |
| + bool ShouldDisplayProcess(const arc::ArcProcess& process) const; |
| + |
| + private: |
| + std::set<std::string> whitelist_; |
|
Luis Héctor Chávez
2017/01/26 17:55:13
nit: const
Eliot Courtney
2017/01/30 07:48:53
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcProcessFilter); |
| +}; |
| + |
| +} // namespace task_manager |
| + |
| +#endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_ARC_ARC_PROCESS_FILTER_H_ |