| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "services/resource_coordinator/memory/coordinator/process_map.h" | 8 #include "services/resource_coordinator/memory_instrumentation/process_map.h" |
| 9 #include "services/service_manager/public/cpp/identity.h" | 9 #include "services/service_manager/public/cpp/identity.h" |
| 10 #include "services/service_manager/public/interfaces/service_manager.mojom.h" | 10 #include "services/service_manager/public/interfaces/service_manager.mojom.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace memory_instrumentation { | 13 namespace memory_instrumentation { |
| 14 | 14 |
| 15 using RunningServiceInfoPtr = service_manager::mojom::RunningServiceInfoPtr; | 15 using RunningServiceInfoPtr = service_manager::mojom::RunningServiceInfoPtr; |
| 16 using ServiceManagerListenerRequest = | 16 using ServiceManagerListenerRequest = |
| 17 service_manager::mojom::ServiceManagerListenerRequest; | 17 service_manager::mojom::ServiceManagerListenerRequest; |
| 18 | 18 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 EXPECT_EQ(static_cast<base::ProcessId>(1), process_map.GetProcessId(ids[1])); | 64 EXPECT_EQ(static_cast<base::ProcessId>(1), process_map.GetProcessId(ids[1])); |
| 65 EXPECT_EQ(static_cast<base::ProcessId>(2), process_map.GetProcessId(ids[2])); | 65 EXPECT_EQ(static_cast<base::ProcessId>(2), process_map.GetProcessId(ids[2])); |
| 66 EXPECT_EQ(static_cast<base::ProcessId>(3), process_map.GetProcessId(ids[3])); | 66 EXPECT_EQ(static_cast<base::ProcessId>(3), process_map.GetProcessId(ids[3])); |
| 67 | 67 |
| 68 process_map.OnServiceStopped(ids[1]); | 68 process_map.OnServiceStopped(ids[1]); |
| 69 EXPECT_EQ(base::kNullProcessId, process_map.GetProcessId(ids[1])); | 69 EXPECT_EQ(base::kNullProcessId, process_map.GetProcessId(ids[1])); |
| 70 EXPECT_EQ(static_cast<base::ProcessId>(3), process_map.GetProcessId(ids[3])); | 70 EXPECT_EQ(static_cast<base::ProcessId>(3), process_map.GetProcessId(ids[3])); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace memory_instrumentation | 73 } // namespace memory_instrumentation |
| OLD | NEW |