| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/containers/hash_tables.h" |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 12 #include "base/hash_tables.h" | |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 // ExternalMetrics is a service that Chrome offers to Chrome OS to upload | 17 // ExternalMetrics is a service that Chrome offers to Chrome OS to upload |
| 18 // metrics to the UMA server on its behalf. Chrome periodically reads the | 18 // metrics to the UMA server on its behalf. Chrome periodically reads the |
| 19 // content of a well-know file, and parses it into name-value pairs, each | 19 // content of a well-know file, and parses it into name-value pairs, each |
| 20 // representing a Chrome OS metrics event. The events are logged using the | 20 // representing a Chrome OS metrics event. The events are logged using the |
| 21 // normal UMA mechanism. The file is then truncated to zero size. Chrome uses | 21 // normal UMA mechanism. The file is then truncated to zero size. Chrome uses |
| 22 // flock() to synchronize accesses to the file. | 22 // flock() to synchronize accesses to the file. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Used for testing only. | 87 // Used for testing only. |
| 88 RecorderType test_recorder_; | 88 RecorderType test_recorder_; |
| 89 base::FilePath test_path_; | 89 base::FilePath test_path_; |
| 90 DISALLOW_COPY_AND_ASSIGN(ExternalMetrics); | 90 DISALLOW_COPY_AND_ASSIGN(ExternalMetrics); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace chromeos | 93 } // namespace chromeos |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ | 95 #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_METRICS_H_ |
| OLD | NEW |