Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/metrics/plugin_metrics_provider.h

Issue 441013002: Eliminate MetricsProvider::RecordCurrentState() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes and name improvements Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
35 35
36 // Fetches plugin information data asynchronously and calls |done_callback| 36 // Fetches plugin information data asynchronously and calls |done_callback|
37 // when done. 37 // when done.
38 void GetPluginInformation(const base::Closure& done_callback); 38 void GetPluginInformation(const base::Closure& done_callback);
39 39
40 // metrics::MetricsDataProvider: 40 // metrics::MetricsDataProvider:
41 virtual void ProvideSystemProfileMetrics( 41 virtual void ProvideSystemProfileMetrics(
42 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; 42 metrics::SystemProfileProto* system_profile_proto) OVERRIDE;
43 virtual void ProvideStabilityMetrics( 43 virtual void ProvideStabilityMetrics(
44 metrics::SystemProfileProto* system_profile_proto) OVERRIDE; 44 metrics::SystemProfileProto* system_profile_proto) OVERRIDE;
45 virtual void RecordCurrentState() OVERRIDE; 45 void RecordCurrentState();
Alexei Svitkine (slow) 2014/08/06 15:10:01 Now that this is no longer an implementation of th
gayane -on leave until 09-2017 2014/08/06 19:38:27 Done.
46 46
47 // Notifies the provider about an error loading the plugin at |plugin_path|. 47 // Notifies the provider about an error loading the plugin at |plugin_path|.
48 void LogPluginLoadingError(const base::FilePath& plugin_path); 48 void LogPluginLoadingError(const base::FilePath& plugin_path);
49 49
50 // Sets this provider's list of plugins, exposed for testing. 50 // Sets this provider's list of plugins, exposed for testing.
51 void SetPluginsForTesting(const std::vector<content::WebPluginInfo>& plugins); 51 void SetPluginsForTesting(const std::vector<content::WebPluginInfo>& plugins);
52 52
53 // Posts a delayed task for RecordCurrentState. Returns true if new task is
54 // posted and false if there was one already waiting for execution.
55 // The param delay_sec is for unit tests.
56 bool RecordCurrentStateWithDelay(int delay_ms);
Alexei Svitkine (slow) 2014/08/06 15:10:01 The new methods you're adding shouldn't be public.
gayane -on leave until 09-2017 2014/08/06 19:38:27 Done.
57
58 // If a delayed RecordCurrnetState task exists than cancels it, calls
Alexei Svitkine (slow) 2014/08/06 15:10:01 nit: than -> then
gayane -on leave until 09-2017 2014/08/06 19:38:27 Done.
59 // RecordCurrentState immediately and returns true. Otherwise returns false.
60 bool RecordCurrentStateIfPending();
61
53 // Returns true if process of type |type| should be counted as a plugin 62 // Returns true if process of type |type| should be counted as a plugin
54 // process, and false otherwise. 63 // process, and false otherwise.
55 static bool IsPluginProcess(int process_type); 64 static bool IsPluginProcess(int process_type);
56 65
57 // Registers local state prefs used by this class. 66 // Registers local state prefs used by this class.
58 static void RegisterPrefs(PrefRegistrySimple* registry); 67 static void RegisterPrefs(PrefRegistrySimple* registry);
59 68
60 private: 69 private:
61 struct ChildProcessStats; 70 struct ChildProcessStats;
62 71
(...skipping 20 matching lines...) Expand all
83 92
84 // Buffer of child process notifications for quick access. 93 // Buffer of child process notifications for quick access.
85 std::map<base::string16, ChildProcessStats> child_process_stats_buffer_; 94 std::map<base::string16, ChildProcessStats> child_process_stats_buffer_;
86 95
87 base::WeakPtrFactory<PluginMetricsProvider> weak_ptr_factory_; 96 base::WeakPtrFactory<PluginMetricsProvider> weak_ptr_factory_;
88 97
89 DISALLOW_COPY_AND_ASSIGN(PluginMetricsProvider); 98 DISALLOW_COPY_AND_ASSIGN(PluginMetricsProvider);
90 }; 99 };
91 100
92 #endif // CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_ 101 #endif // CHROME_BROWSER_METRICS_PLUGIN_METRICS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/plugin_metrics_provider.cc » ('j') | chrome/browser/metrics/plugin_metrics_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698