OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ |
6 #define CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class ExtensionsMetricsProvider : public metrics::MetricsProvider { | 28 class ExtensionsMetricsProvider : public metrics::MetricsProvider { |
29 public: | 29 public: |
30 // Holds on to |metrics_state_manager|, which must outlive this object, as a | 30 // Holds on to |metrics_state_manager|, which must outlive this object, as a |
31 // weak pointer. | 31 // weak pointer. |
32 explicit ExtensionsMetricsProvider( | 32 explicit ExtensionsMetricsProvider( |
33 metrics::MetricsStateManager* metrics_state_manager); | 33 metrics::MetricsStateManager* metrics_state_manager); |
34 virtual ~ExtensionsMetricsProvider(); | 34 virtual ~ExtensionsMetricsProvider(); |
35 | 35 |
36 // metrics::MetricsProvider: | 36 // metrics::MetricsProvider: |
37 virtual void ProvideSystemProfileMetrics( | 37 virtual void ProvideSystemProfileMetrics( |
38 metrics::SystemProfileProto* system_profile) OVERRIDE; | 38 metrics::SystemProfileProto* system_profile) override; |
39 | 39 |
40 protected: | 40 protected: |
41 // Exposed for the sake of mocking in test code. | 41 // Exposed for the sake of mocking in test code. |
42 | 42 |
43 // Retrieves the set of extensions installed in the given |profile|. | 43 // Retrieves the set of extensions installed in the given |profile|. |
44 virtual scoped_ptr<extensions::ExtensionSet> GetInstalledExtensions( | 44 virtual scoped_ptr<extensions::ExtensionSet> GetInstalledExtensions( |
45 Profile* profile); | 45 Profile* profile); |
46 | 46 |
47 // Retrieves the client ID. | 47 // Retrieves the client ID. |
48 virtual uint64 GetClientID(); | 48 virtual uint64 GetClientID(); |
(...skipping 21 matching lines...) Expand all Loading... |
70 | 70 |
71 // The profile for which extensions are gathered for the occupied bucket | 71 // The profile for which extensions are gathered for the occupied bucket |
72 // metric. Once a profile is found its value is cached here so that | 72 // metric. Once a profile is found its value is cached here so that |
73 // GetMetricsProfile() can return a consistent value. | 73 // GetMetricsProfile() can return a consistent value. |
74 Profile* cached_profile_; | 74 Profile* cached_profile_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(ExtensionsMetricsProvider); | 76 DISALLOW_COPY_AND_ASSIGN(ExtensionsMetricsProvider); |
77 }; | 77 }; |
78 | 78 |
79 #endif // CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ | 79 #endif // CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ |
OLD | NEW |