| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H | 5 #ifndef COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H |
| 6 #define COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H | 6 #define COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 explicit ArcMetricsService(ArcBridgeService* bridge_service); | 23 explicit ArcMetricsService(ArcBridgeService* bridge_service); |
| 24 ~ArcMetricsService() override; | 24 ~ArcMetricsService() override; |
| 25 | 25 |
| 26 // ArcBridgeService::Observer overrides. | 26 // ArcBridgeService::Observer overrides. |
| 27 void OnProcessInstanceReady() override; | 27 void OnProcessInstanceReady() override; |
| 28 void OnProcessInstanceClosed() override; | 28 void OnProcessInstanceClosed() override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 bool CalledOnValidThread(); | 31 bool CalledOnValidThread(); |
| 32 void RequestProcessList(); | 32 void RequestProcessList(); |
| 33 void ParseProcessList(mojo::Array<arc::RunningAppProcessInfoPtr> processes); | 33 void ParseProcessList( |
| 34 mojo::Array<arc::mojom::RunningAppProcessInfoPtr> processes); |
| 34 | 35 |
| 35 base::ThreadChecker thread_checker_; | 36 base::ThreadChecker thread_checker_; |
| 36 base::RepeatingTimer timer_; | 37 base::RepeatingTimer timer_; |
| 37 | 38 |
| 38 ArcLowMemoryKillerMonitor low_memory_killer_minotor_; | 39 ArcLowMemoryKillerMonitor low_memory_killer_minotor_; |
| 39 | 40 |
| 40 // Always keep this the last member of this class to make sure it's the | 41 // Always keep this the last member of this class to make sure it's the |
| 41 // first thing to be destructed. | 42 // first thing to be destructed. |
| 42 base::WeakPtrFactory<ArcMetricsService> weak_ptr_factory_; | 43 base::WeakPtrFactory<ArcMetricsService> weak_ptr_factory_; |
| 43 | 44 |
| 44 DISALLOW_COPY_AND_ASSIGN(ArcMetricsService); | 45 DISALLOW_COPY_AND_ASSIGN(ArcMetricsService); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace arc | 48 } // namespace arc |
| 48 | 49 |
| 49 #endif // COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H | 50 #endif // COMPONENTS_ARC_METRICS_ARC_METRICS_SERVICE_H |
| OLD | NEW |