| 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_METRICS_FILE_METRICS_PROVIDER_H_ | 5 #ifndef COMPONENTS_METRICS_FILE_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_FILE_METRICS_PROVIDER_H_ | 6 #define COMPONENTS_METRICS_FILE_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 // System could not map file into memory. | 123 // System could not map file into memory. |
| 124 ACCESS_RESULT_SYSTEM_MAP_FAILURE, | 124 ACCESS_RESULT_SYSTEM_MAP_FAILURE, |
| 125 | 125 |
| 126 // File had invalid contents. | 126 // File had invalid contents. |
| 127 ACCESS_RESULT_INVALID_CONTENTS, | 127 ACCESS_RESULT_INVALID_CONTENTS, |
| 128 | 128 |
| 129 // File could not be opened. | 129 // File could not be opened. |
| 130 ACCESS_RESULT_NO_OPEN, | 130 ACCESS_RESULT_NO_OPEN, |
| 131 | 131 |
| 132 // File contents were internally deleted. |
| 133 ACCESS_RESULT_MEMORY_DELETED, |
| 134 |
| 132 ACCESS_RESULT_MAX | 135 ACCESS_RESULT_MAX |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 // Information about sources being monitored; defined and used exclusively | 138 // Information about sources being monitored; defined and used exclusively |
| 136 // inside the .cc file. | 139 // inside the .cc file. |
| 137 struct SourceInfo; | 140 struct SourceInfo; |
| 138 using SourceInfoList = std::list<std::unique_ptr<SourceInfo>>; | 141 using SourceInfoList = std::list<std::unique_ptr<SourceInfo>>; |
| 139 | 142 |
| 140 // Looks for the next file to read within a directory. Returns true if a | 143 // Looks for the next file to read within a directory. Returns true if a |
| 141 // file was found. This is part of CheckAndMapNewMetricSourcesOnTaskRunner | 144 // file was found. This is part of CheckAndMapNewMetricSourcesOnTaskRunner |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 202 |
| 200 base::ThreadChecker thread_checker_; | 203 base::ThreadChecker thread_checker_; |
| 201 base::WeakPtrFactory<FileMetricsProvider> weak_factory_; | 204 base::WeakPtrFactory<FileMetricsProvider> weak_factory_; |
| 202 | 205 |
| 203 DISALLOW_COPY_AND_ASSIGN(FileMetricsProvider); | 206 DISALLOW_COPY_AND_ASSIGN(FileMetricsProvider); |
| 204 }; | 207 }; |
| 205 | 208 |
| 206 } // namespace metrics | 209 } // namespace metrics |
| 207 | 210 |
| 208 #endif // COMPONENTS_METRICS_FILE_METRICS_PROVIDER_H_ | 211 #endif // COMPONENTS_METRICS_FILE_METRICS_PROVIDER_H_ |
| OLD | NEW |