| 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_PLUGIN_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Fetches plugin information data asynchronously and calls |done_callback| | 37 // Fetches plugin information data asynchronously and calls |done_callback| |
| 38 // when done. | 38 // when done. |
| 39 void GetPluginInformation(const base::Closure& done_callback); | 39 void GetPluginInformation(const base::Closure& done_callback); |
| 40 | 40 |
| 41 // metrics::MetricsDataProvider: | 41 // metrics::MetricsDataProvider: |
| 42 virtual void ProvideSystemProfileMetrics( | 42 virtual void ProvideSystemProfileMetrics( |
| 43 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; | 43 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; |
| 44 virtual void ProvideStabilityMetrics( | 44 virtual void ProvideStabilityMetrics( |
| 45 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; | 45 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; |
| 46 virtual void ClearSavedStabilityMetrics() OVERRIDE; |
| 46 | 47 |
| 47 // Notifies the provider about an error loading the plugin at |plugin_path|. | 48 // Notifies the provider about an error loading the plugin at |plugin_path|. |
| 48 void LogPluginLoadingError(const base::FilePath& plugin_path); | 49 void LogPluginLoadingError(const base::FilePath& plugin_path); |
| 49 | 50 |
| 50 // Sets this provider's list of plugins, exposed for testing. | 51 // Sets this provider's list of plugins, exposed for testing. |
| 51 void SetPluginsForTesting(const std::vector<content::WebPluginInfo>& plugins); | 52 void SetPluginsForTesting(const std::vector<content::WebPluginInfo>& plugins); |
| 52 | 53 |
| 53 // Returns true if process of type |type| should be counted as a plugin | 54 // Returns true if process of type |type| should be counted as a plugin |
| 54 // process, and false otherwise. | 55 // process, and false otherwise. |
| 55 static bool IsPluginProcess(int process_type); | 56 static bool IsPluginProcess(int process_type); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 102 |
| 102 // Buffer of child process notifications for quick access. | 103 // Buffer of child process notifications for quick access. |
| 103 std::map<base::string16, ChildProcessStats> child_process_stats_buffer_; | 104 std::map<base::string16, ChildProcessStats> child_process_stats_buffer_; |
| 104 | 105 |
| 105 base::WeakPtrFactory<PluginMetricsProvider> weak_ptr_factory_; | 106 base::WeakPtrFactory<PluginMetricsProvider> weak_ptr_factory_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(PluginMetricsProvider); | 108 DISALLOW_COPY_AND_ASSIGN(PluginMetricsProvider); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 #endif // CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ | 111 #endif // CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ |
| OLD | NEW |